By Liana B. Baker

RIO DE JANEIRO (Reuters) - For one split second, Michael Phelps' dream of a 21st gold medal turned into a nightmare for his swimwear maker, Aqua Sphere.

Phelps' self-branded "MP" cap split in half as he pulled it over his head in front of a global TV audience at the Rio Games on Tuesday night, just as he prepared to swim the anchor leg of the 4x200 meter freestyle relay.

After a moment of panic, Phelps turned to teammate Conor Dwyer who came to the rescue with his own cap - though Dwyer, who is sponsored by Speedo, saved the swimming super star's blushes by inverting the cap to hide the rival logo.

"Certainly not a moment you dream about," said Todd Mitchell, business line manager of Aqua Sphere, a division of Aqua Lung that is part of French group Air Liquide SA.

"There's a reality that the caps are made out of silicone. Those things do happen," Mitchell said at the Rio Games.

Phelps left Speedo after the 2012 London Games and has been using a swim kit designed for him by Aqua Sphere, a virtual unknown in swim racing, which made its Olympic debut this week.

His agreement with Aqua Sphere for the "MP" line runs through 2020 and includes equity-type elements, which may include royalties or a cut of sales.

For Phelps and Aqua Sphere, the stakes are high as they pursue a piece of the global market for competitive and fitness swimwear, estimated to be worth $1 billion in annual sales.

They are up against established rivals such as Speedo, a privately owned brand licensed to a unit of apparel firm PVH Corp, as well as TYR, owned by swimwear designer Joseph DiLorenzo, and Arena, held by Swiss private equity firm Capvis.

Aqua Sphere "MP" swim caps are shaped using a special model of Phelps' head and cross the ears at an angle, allowing him to hear the roar of the crowd.

Phelps will be back in the pool this week with this cap.

Aqua Sphere's Mitchell said the incident would spur the company's development of different swimcap materials such as textiles and different silicon mixes. Sales for other items in the MP line like "jammers" or swim trunks have been surging since the Olympics started, Mitchell said.

But it was Speedo that clearly enjoyed the night.

"Relay races create an opportunity for athletes to support each other differently than any race in the Games. It was great Conor was able to lend Michael his cap following his leg of the relay," Speedo USA marketing executive Pierre Martin said.

(Editing by Mark Bendeich)