The Queen has made a surprise appearance to officially open the completed Elizabeth line, named in her honour.

She was given an Oyster card and shown how to use it on a ticket machine.

The 96-year-old monarch, who now rarely carries out public engagements outside of her royal residences, joined her youngest son the Earl of Wessex at Paddington Station for the royal visit on Tuesday.

Dressed in sunshine yellow, the Queen arrived at 11.32am, stepping carefully from the transparent lift while holding a walking stick.

The Queen smiled warmly as she met Crossrail and Elizabeth line workers and walked slowly as she made her way around the station concourse.

Elizabeth line customer experience assistant Kofi Duah said he was “thrilled” to present an Oyster card to the Queen and show her how it could be topped up on a machine.

The Queen did not top up the card, which was pre-loaded with £5 of credit.

Crossrail
The Queen using an oyster card machine at Paddington station (Andrew Matthews/PA)

Mr Duah told the PA news agency: “I gave her an Oyster card and told her she can tap it on the yellow reader.

“I showed her the current balance and how to top up the Oyster.

“She said ‘Where can I use it?’.

“I said ‘You can use it across our line, so from Paddington to Abbey Wood.

“She said ‘Oh nice, splendid’.”

Crossrail
The Queen being shown how to use the oyster card ticket machine works (Andrew Matthews/PA)

Unveiling a plaque stating that she had “officially opened” the Elizabeth line, the monarch spent 10 minutes in the station before departing in a lift, escorted by her son Edward.

The earl returned to the concourse ahead of a return journey on the railway from Paddington to Tottenham Court Road.

The nation’s longest reigning head of state is just over two weeks away from her Platinum Jubilee celebratory weekend.

A Buckingham Palace spokeswoman said: “In a happy development, Her Majesty The Queen is attending today’s event to mark the completion of the Elizabeth line.

“Her Majesty was aware of the engagement and the organisers were informed of the possibility she may attend.”

Crossrail
The Queen at Paddington station to mark the completion of London’s Crossrail project (Andrew Matthews/PA)

The Queen’s outfit was a Stewart Parvin double-wool crepe coat with an A-line silk dress in shades of yellow, royal blue and turquoise, and a matching hat by Rachel Trevor-Morgan.

She was wearing her Singapore brooch.

The Queen rallied to make a trip to the Windsor Horse Show on Friday and on Sunday was the guest of honour at the equestrian extravaganza A Gallop Through History near Windsor, the first major event of the Jubilee festivities.

Crossrail
The Queen and Edward meet staff who have been key to the Crossrail project, as well as Elizabeth Line staff (Andrew Matthews/PA)

Tuesday’s engagement is the Queen’s first one outside of the Windsor area since she attended the Duke of Edinburgh’s memorial service in Westminster Abbey seven weeks ago.

The Queen and Edward were welcomed by Prime Minister Boris Johnson, Mayor of London Sadiq Khan and Transport for London commissioner Andy Byford.

Following the Queen’s visit, Mr Johnson told the invited guests: “We’re all incredibly touched and moved and grateful to Her Majesty for coming to open the Elizabeth line today.

“It was fantastic to see her.”

The Queen and Edward met staff who have been key to the project and who will run the railway, including train drivers, station staff and apprentices.

The Elizabeth line, named in honour of the Queen in her Jubilee year, will open to passengers on May 24.

Edward, on his trip on the line, was invited to stand in the driver’s cab during the second leg of the journey.

He chatted with driver Carinne Spinola as the train moved, telling her it was “brilliant”.

Crossrail
The Queen with the Earl of Wessex and Andy Byford Commissioner of Transport for London (Andrew Matthews/PA)

After stepping off the train at Paddington, the earl said: “That was brilliant. I did enjoy that. It was good fun.”

Crossrail, the project to build the new east-west railway, was delayed and over budget due to numerous issues including construction difficulties and complications installing signalling systems.

It was due to be completed in December 2018 and was set a budget of £14.8 billion in 2010.

The total cost has been estimated at £18.9 billion, including £5.1 billion from the Government.

Signage on display at the Paddington Elizabeth line station
Crossrail was due to be completed in December 2018 but suffered major delays (Jonathan Brady/PA)

The Elizabeth line will boost capacity and cut journey times for travel across the capital.

It will stretch from Reading, in Berkshire, and Heathrow Airport, in west London, to Shenfield, in Essex, and Abbey Wood, in south-east London.

Trains will initially operate in three sections, which are expected to be integrated in the autumn.