A security alert was sparked at Heathrow after an intruder scaled a perimeter fence and locked himself inside the cockpit of a Boeing 747.

The man entered the British Airways engineering base at Hatton Cross where the empty 747 aircraft was parked, according to reports.

He was spotted climbing into the aircraft and fled to the flight deck, an airport source was reported as saying.

He was said to have slammed the high-security cockpit doors, locking himself into the pilots’ seating area.

He was taken off the aircraft after the airport’s fire service was called and managed to open the door for police, the Times reported. BA declined to comment.

The airport source said: “It was a very difficult and complex situation and in the end the fire brigade had to be called to the plane and carried out a long and very protracted operation to get into the cockpit.

He added: “It is a terrifying situation when you think about it. Here is a man who not only has managed to go air-side at one of the world’s busiest airports but he has successfully got to a Boeing 747 jet liner and found it open and was able to climb aboard.

“Then he got on to the flight deck and barricaded himself in using the plane’s own anti-terrorist equipment.”

Police confirmed that there had been an incident on an aircraft but said that it was not believed to be terrorist-related.

They said that a 38-year-old man had been arrested and was being held in custody at a West London police station. He was expected to appear in court.

A police spokesman added: “He has been remanded into custody at a west London police station and will appear at court at the earliest opportunity.”

A Heathrow spokeswoman said: “Individuals illegally entering the airside environment potentially endanger their own lives and those of others. We are working with police following [the] incident.”