After running through over 300 cities across 27 Brazilian states, the Rio 2016 Olympic flame has finally arrived in the cidade maravilhosa – the marvelous city – on Wednesday.

RELATED: Olympic flame gets closer to the marvelous city

The final chapter of the Olympic flame’s journey through the country started in the commuter town of Niterói, where the symbol of the Games took a yacht – which was steered by seven Olympic sailing medallists from Brazil – towards a historic naval base in Rio, crossing the Guanabara Bay.

The sail route paid tribute to the sport that Brazil has won its most Olympic medals in.

The crew of sailors included Torben Grael, one of Brazil’s top medallists at the Olympic Games, with two gold, one silver and two bronze medals from Los Angeles 1984, Seoul 1988, Atlanta 1996, Sydney 2000 and Athens 2004.

RELATED: Sarah Pavan’s top things to do in Rio

After crossing the bay, the crew handed the flame to the mayor of Rio, the first torchbearer on carioca soil. By the end of the day, the flame will have run through the historic centre of the host city, ride the new light rail system, visit the Municipal Theatre and end the day in Rio’s suburbs.

On Thursday, the Olympic flame will visit the Barra and Deodoro zones, Ipanema and Copacabana neighbourhoods, the Macumba beach and Praça Mauá. It will be carried by world football champions Cafu, Carlos Alberto Parreira and Mário Zagallo; surfer Rico Souza; and other famous personalities.

The last day of the relay will begin with a visit to Christ the Redeemer, followed by the Archbishop of Rio and then Sugarloaf Mountain. The final stop of the Olympic flame in Rio will be the Maracanã Stadium, where the Opening Ceremony will take place and the cauldron will signal the start of the Games.