A gunman who hijacked a passenger plane in Montego Bay, Jamaica, has surrendered after police and soldiers boarded the jet, say officials.
Six crew members held hostage by the man were released unharmed.
More than 150 passengers were on board when the man forced his way onto the Canada-bound plane demanding passage to Cuba, but were released within hours.
The hijacker, believed to be a 20-year-old local man, was described by the authorities as "troubled".
Jamaican Information Minister Daryl Vaz told the BBC the incident had ended "without any injuries or harm".
He said the authorities had been "getting nowhere with the negotiations" with the hijacker.
"Police and military went on the plane and captured him," he said.
Jamaican Prime Minister Bruce Golding flew in to Montego Bay and offered support to the passengers.
Canadian Prime Minister Stephen Harper, currently in Jamaica on a one-day visit following the recent Summit of the Americas in Trinidad, telephoned Mr Golding to congratulate him "for the successful resolution", his spokesman said.
The aircraft was bound for Halifax, Nova Scotia, but was due to stop in Santa Clara in Cuba on the way.
Jamaican minister Daryl Vaz: 'Gunman is a Jamaican national'
The gunman reportedly checked in for the flight then forced his way past checkpoints and went on board around 2230 local time (0330 GMT), brandishing a firearm.
He is said to have robbed passengers, most of whom were released after half an hour.
Police and security services closed and cordoned off the airport and surrounded the plane as the situation developed.
The charter airline that owns the Boeing 737 plane, CanJet, said 182 people, including 174 passengers, were due to travel on the flight.
But reports said only 159 passengers had been on board when the incident began.
CanJet's Vice-President and General Manager, Ken Woodside, told an earlier news conference that a shot may have been fired outside the aircraft, but no-one was hit.
Two of the passengers were held for several hours before being released, according to reports.
Most passengers, all of whom are Canadian, were taken to a local hospital, some of them suffering from shock.
The parents of Christian Gosselin, a passenger on the flight, said he had telephoned them and appeared "very shaken up and calm at the same time".
"Passengers were asked to give out all their money," Mr Gosselin's father, Alphonse, told Canada's CBC news channel.
"[Christian] told his girlfriend to hide their passports in her back pocket, and also their credit cards," he said.
Mr Vaz told the BBC the authorities had not yet been able to establish how the armed man managed to pass security.
He said an investigation had been started and would be "pursued vigorously" so the authorities could identity security breaches.
Mr Vaz has described the hijacker as a "mentally challenged youngster" who was demanding to be flown to Cuba.
Correspondents say security at Montego Bay's Sangster International Airport is normally very good.
The airport, one of the most modern in the Caribbean, handles about four million passengers a year.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.