Dani Pedrosa kept his cards close to his chest, but it was well known that the 31-time MotoGP winner was in discussions with the new Petronas-backed Sepang Yamaha team after losing his Honda seat to Jorge Lorenzo.

Indeed, Pedrosa postponed a planned retirement announcement at Catalunya as the Yamaha talks intensified.

But ultimately, the Spaniard decided it was time to call an end to his racing career, albeit thanking Sepang and Yamaha for their patience while he made a final decision.

"The Pedrosa [talks] were a reality. It was very, very close," Sepang CEO Razlan Razali told Crash.net.

"He spoke to Yamaha, Yamaha assured him they would give him all the support he needs. I sat down with him, together with Carmelo [Ezpeleta, Dorna CEO] and the same thing as well.

"But when a rider is not mentally sure about continuing to race, there's not much we can do.

"But we were in serious discussions. When he decided to call it a day, he actually gave me a call and thanked me for the opportunity. He apologised for not responding quicker, but I can understand that it was a big decision for him and I respect his decision.

"He was very professional about it all."

Prior to Pedrosa, Sepang had initially been linked with another MotoGP 'A-lister' in the form of triple premier-class champion Lorenzo. However, Sepang did not yet have a confirmed place on the 2019 grid.

"At that time having a MotoGP team was still just a concept," Razali said.

"Nothing was set in stone, so we couldn't even talk to anybody at that stage, but somehow paddock rumours started circulating and he [Lorenzo] thought we were setting the team up just for him. Which we weren't.

"But of course, he surprised everyone and joined Honda anyway - which is fine because he would have been expensive for our budget anyway!"

Lorenzo and Pedrosa moving out of the picture also had a knock-on effect in terms of the Sepang team's choice of M1 machinery.

For the first time, Yamaha offered Sepang the chance to run factory 'A Spec' bikes, equal to the official team of Valentino Rossi and Maverick Vinales at the start of the season, rather than year-old 'B Spec' machinery previously used by Tech3. Naturally, the A Spec would cost more.

While Pedrosa would need an A Spec to be interested in the deal, Razali revealed Petronas had been willing to fund two such entries, with Franco Morbidelli pencilled-in for a factory bike from the very start.

"We want to be competitive. We don't want to just make up the numbers and hence we made the decision and negotiated for one factory machine. Initially it was two. But then [Pedrosa] dropped off," Razali said.

"But Frankie was always an automatic choice. He was always in the equation whether the top rider would have been Pedrosa or Lorenzo. And we always planned for Frankie to have a factory bike."

When Pedrosa decided to retire - and with no other proven MotoGP winners available - Sepang, Petronas and Yamaha decided to take a gamble on a rookie; Fabio Quartararo, who will spend his debut season alongside Morbidelli on a B Spec bike.

"When we ran out of riders for the second bike of the calibre that would deserve a factory ride, then we thought, 'let's look at a young rider'. We didn't make that decision alone, we consulted Yamaha as well.

"A few names came in and we locked onto Quartararo.

"Everyone was quite excited because we know where he's comes from and how he's progressed. Yamaha liked it as well, Dorna liked it, the French Grand Prix guys like it. I think he has the potential and we're happy to give Fabio this chance."

Petronas Yamaha, Malaysia's first MotoGP team, will hold its official team launch in Kuala Lumpur on January 28.

Pedrosa - who recently revealed that HRC president Yoshishige Nomura told him he was too small to stay on as the factory's MotoGP test rider - has signed for test riding duties with KTM.

The Spaniard is currently undergoing stem cell treatment on a fractured collarbone.