Media playback is unsupported on your device Media caption Dame Sarah Storey won a record 14th medal in Rio

The Queen has praised the performance of Britain's Paralympics team at Rio 2016 as "magnificent" as the athletes returned to the UK on a special flight.

Parades to celebrate the country's Olympic and Paralympic success have been confirmed for Manchester on 17 October and London a day later.

Paralympic medallists were welcomed by fans and family who met their flight at London Heathrow on Tuesday morning.

GB won 147 medals, 64 of them gold, at the Paralympics and 67 Olympic medals.

Cheers and tears welcome GB Paralympic heroes

Those included 27 Olympic gold medals. Both teams broke their medal tallies from London four years ago, hit their 2016 targets, and finished second in their medal tables.

Image copyright Getty Images Image caption Paralympians were treated to champagne aboard their return flight

As the Paralympics closed and athletes returned to their home countries, the Queen said: "I offer my warmest congratulations to the athletes of Great Britain and Northern Ireland, and indeed to the athletes of all Commonwealth countries, for their many successes in Rio de Janeiro.

"The magnificent performance of Paralympics GB this year reflects the talent and commitment of the athletes and their support teams.

"I send my good wishes to all those who have contributed to the success of these memorable Games."

At the scene: Cheers and tears

By Cherry Wilson, BBC News, at Heathrow Airport

A loud cheer rippled through the arrivals hall at Heathrow Terminal 5 - marking the moment that the all-conquering Paralympians came home.

It was a welcome richly deserved for a team that had weighed down the plane with more medals than any British team had amassed since 1988.

Many athletes immediately showed the speed that had earned them such rich rewards, rushing into the arms of their family and friends.

One of the first to come through the door was rower Rachel Morris.

She had a tear in her eye as she hugged and showed off her gold medal to dad Carey.

One of the biggest cheers was for Kadeena Cox, who has become something of a poster girl for the Rio Paralympics for her heroics in both athletics and cycling.

Her first words were for her family, who had travelled from Leeds to meet her: "I've missed them. I didn't want to leave Rio but I wanted to see family."

'We had a big hug and then I held the medal'

Sports minister Tracey Crouch said the competitors had been an inspiration to millions and confirmed there would be two celebratory parades.

"I know that Manchester - a city with a rich sporting history - and London - with its strong links with the Olympic and Paralympic Games - will host brilliant celebrations that will give the British public a chance to say thank you to our amazing athlete heroes," she said.

Image copyright PA Image caption Lauren Rowles received a hug fit for a gold medallist on her return

Waiting for the athletes at Heathrow on Tuesday, double-gold medallist Kadeena Cox's sister Carmel Williams said: "We thought she was going to come back with some golds. But breaking a few world records that's a major achievement.

"I'm just excited to see her."

Image caption Double gold medallist Kadeena Cox's family planned a big welcome

On board the flight, GB Para canoeist Anne Dickins observed "the world is better with bunting".

Her coach Phil Gunney was waiting for the gold medallist at the airport: "She's worked really hard and had a lot of challenges to get there," he said.

"We were confident she could make the podium. It was 0.2 of a second so I didn't know whether she had won at first. My reaction was very loud. I'm a driving instructor and I was sat with a student shouting at the iPad!"

Image copyright Anne Dickins Image caption "Better with bunting," says gold medallist Anne Dickins

And in the arrivals hall, Dame Sarah Storey, whose Paralympic career has seen her win multiple gold medals in swimming and cycling, said athletes boarded the plane early and in high spirits to "get into the champagne".

Table tennis gold medallist Will Bailey said the team spirit was "absolutely electric" on the flight home.

He said: "You know although it's an individual sport I very much feel part of Paralympics GB team and you know, we're all buzzing and so happy. We've achieved so much out there in Rio."

'Smashed it'

Reflecting on the team's success, she said: "We got off to a great start on day one, medals rolling in and everyone wants to be a part of that.

"We've had 20 years of great investment, then a home games. We wanted to continue the momentum and we smashed it."

She said her teammates performances, some across multiple sports, had given her "goosebumps" and said despite predictions of low crowds and safety concerns, the Paralympics in Brazil "just was brilliant".

Heroes' welcome

The UK government is working with the British Olympic Association, the British Paralympic Association and both cities to finalise the details of the parades.

London Mayor Sadiq Khan tweeted that he was delighted to confirm a "heroes' return" for the country's Olympians and Paralympians.

Image copyright iStock Image caption Multiple gold medal-winning equestrian Sophie Christiansen returned from her fourth Paralympics

Among the British Olympic successes in Rio were track cyclists Jason Kenny and Laura Trott, who between them won five golds, taking the couple's gold medal tally to 10.

Runner Mo Farah repeated his London 2012 double, winning gold in the men's 10,000m and 5,000m and swimmer Adam Peaty broke the world record as he won gold in the men's 100m breaststroke. He was the first British man to win an Olympic swimming gold medal since Adrian Moorhouse in 1988.

Image copyright PA Image caption Paralympics GB came second only to China in the medals table with 64 golds

At the Paralympics, Dame Sarah Storey capped off a successful games by winning a third gold medal in the cycling road race, taking her career total to 14 across swimming and cycling.

Kadeena Cox won cycling gold and athletics gold, silver and bronze and was flagbearer in the closing ceremony while runner Jonnie Peacock took T44 100m gold.

Arriving at Heathrow, she said that the medals are important but it was more important to show people what could be done.

She added: "So I could stand here as a role model - to anyone that's had any setbacks to anyone that's got a chronic condition, invisible illnesses, MS, just all those things that are really tough to deal with.

"I just wanted to show them that you can achieve amazing things if you put your mind to it".

Image copyright PA Image caption Kadeena Cox brings home the gold... and silver... and bronze

Paralympics GB chef de mission Penny Briscoe said it was right and fitting that the athletes would receive a welcome in the two cities.

Team GB chef de mission Mark England said it would be a proud moment for all the athletes.

Data hacked

However, details of the celebrations come as a further round of GB athletes, including Olympic champion Mo Farah, have had their medical files made public by internet hackers.

The files mostly deal with therapeutic use exemptions (TUEs), which allow athletes to take banned substances for verified medical needs. There is no suggestion that those named are involved in any wrongdoing.