In June, the board of American International Group rejected a $30 billion offer by Prudential PLC for AIG’s Asian Insurance unit. The decision came just after Prudential shareholders nixed the British insurer’s $35 billion bid for Hong Kong-based AIA.

It was back to the drawing board for John Vasily of Debevoise & Plimpton, who had been trying to sell off AIA and pull it out of AIG’s portfolio since the troubled insurer received federal bailout money in September 2008.

When Vasily and his team were first hired by AIG in the fall of 2008, they started down two paths simultaneously. The first was a possible strategic sale of the insurance operation; the other was a prospectus for a public offering.

“We had two good options,” Vasily says. “AIG just wanted to start paying back the government as soon as possible.”

AIA filed for an IPO at the end of 2009, but those plans were sidelined in early 2010 when Prudential put forth a $35 billion bid for the Asian unit. Once the offer came in, Vasily and his team quickly switched gears to focus on a possible sale to Prudential. “We were off to the races on a highly confidential deal,” he says. The negotiations were hectic for Vasily, who spent two months commuting from Hong Kong, where AIA is based, to AIG’s headquarters in New York and to Prudential’s offices in London.

But Prudential shareholders, who voiced their outrage at the offer, managed to change the course of the deal. The company lowered its bid for AIA to $30 billion, an amount AIG said it would not consider, according to The New York Times.

It was back to the starting point for Vasily, though he wasn’t fazed by the turn of events. “I was loving it,” he says. “It was the kind of complex, international deal that you welcome as an M&A lawyer.” In July, Vasily and AIG reconsidered earlier plans for an IPO, and began to reassemble the Debevoise team that had worked on the IPO the first time around.

“We wanted people to work on the offering who were intimately familiar with the company and the way it worked,” says Vasily. By then Debevoise lawyer Drew Dutton had permanently relocated from Paris to Hong Kong to serve as the lead AIA partner on the ground. Partners and associates were pulled from other assignments to assist on the AIA offering, which AIG wanted done by late October, says Vasily.

“The biggest challenge of this IPO was the time restraint,” says Vasily. “The sheer amount of work that had to be done was astounding.” His team could use some of the information it had compiled when planning for AIA’s IPO back in the fall of 2009, but everything required updating.

On Oct. 29, AIG announced that the Hong Kong IPO of AIA had raised more than $20.5 billion, making it the largest-ever insurance IPO, the largest-ever single listing on the Hong Kong Stock Exchange and the third-largest IPO of all time.

The money raised from AIA’s offering, along with the $16.2 billion sale of AIG’s American Life Insurance Company to MetLife on Nov. 1, will enable the insurer to repay the government $27.71 billion, according to a statement from AIG. AIG still is largely owned by the government — it holds 79.9 percent of the company — after receiving $182.3 billion in bailout money, reports Bloomberg Businessweek.

“You can’t say enough good things about this deal,” says Vasily. “In its totality, it’s really one of a kind.”

This article first appeared on The Am Law Daily blog on AmericanLawyer.com.