OTTAWA -- Federal officials scrambled to book costly last-minute flights in order to bring a cabinet minister back to Ottawa earlier this year in time for an expected vote on the government's controversial doctor-assisted dying bill.

International Development Minister Marie-Claude Bibeau was attending a conference in Copenhagen when officials at Global Affairs Canada got word the Liberals wanted her back in the House of Commons -- and quickly.

"We just received a call from the whip's office," a staffer wrote to Bibeau and his colleagues in one of several emails obtained by The Canadian Press under the Access to Information Act.

"The Minister needs to be back in Ottawa for a vote tomorrow afternoon. She is to be back for 3 p.m.," he wrote in the May 17 email, sent at 4:53 p.m.

He added: "I am not joking."

The mad dash from around the world followed an embarrassing near-miss for the Liberals, when the New Democrats and Conservatives caught chief government whip Andrew Leslie off guard with a surprise vote on an Air Canada bill.

Despite their strong majority in the Commons, the Liberals did not have enough MPs in their seats to win outright; Speaker Geoff Regan ended up having to cast the decisive vote, breaking a 139-139 deadlock in favour of the government.

That prompted Leslie and his office to pull out all the stops to avoid being similarly caught out when it came time to vote on Bill C-14, the controversial assisted-suicide legislation -- including calling a handful of cabinet ministers home from overseas trips.

Bibeau was unavailable for an interview Wednesday.

"In our political system, ministers also have important duties in the House of Commons," her director of communications, Louis Belanger, wrote in an emailed statement.

"They represent their constituencies as MPs. It is understood that their presence in the House of Commons for important votes can be required unexpectedly by the whip's office. The C-14 bill on medical assistance to dying was such a vote."

Bibeau, who was in Copenhagen for a global conference on the rights and health of girls and women, had been originally scheduled to head to Paris and then on to Istanbul and Geneva for other events.

The department then had to book two new sets of flights -- one to get her back to Ottawa from Copenhagen, then another to get her to Turkey in order to resume her interrupted itinerary.

The emails show flights to bring Bibeau home to Ottawa, reserved May 17 and departing Copenhagen early the next morning, were booked for $6,524.10, including fees and taxes.

The flights to get her from Ottawa to Istanbul -- reserved May 19 and departing Ottawa the night of May 20 -- and then back to Canada from Geneva again were booked for $7,473.40.

The emails do not accurately reflect the true cost, because they do not show cancellation fees, refunds and another ticket to get Bibeau from Istanbul to Geneva, Belanger noted. The changes actually ended up costing about $11,500, he said.

According to expenses posted on the proactive disclosure section of the Global Affairs website, a total of $17,678 was spent on airfare for Bibeau during the trip, with Copenhagen, Istanbul and Geneva listed as the destinations.

Belanger also said it cost 260 euros to cancel the hotel where Bibeau was scheduled to stay in Paris.

The department did, however, save money in other ways.

In an email sent May 17 at 6:10 p.m., an official in the office of protocol at Global Affairs said everyone else would be staying behind and meeting Bibeau once she arrived in Istanbul.

"It (saves) around ($10,000) per person in airfare," he wrote.

Bibeau's vote had been "paired" with that of Conservative MP Mike Lake, who was also in Copenhagen to attend the conference as the party's critic for maternal, newborn and child health.

That means their absences from the House would have cancelled each other out, but the emails show Lake, who was not available for an interview, being told that he would also have to come home or seek permission from the Conservative whip to remain.

Lake ended up staying behind in Copenhagen.

As it all turned out, the only recorded vote on C-14 that took place during Bibeau's brief return to Ottawa was a vote on time allocation. The Liberals won that vote 172 to 137 and the record shows Bibeau was not present.