Ecuador has been named the best country to retire in by InternationalLiving.com.

The South American nation, bordered by Colombia and Peru, topped the website's annual global retirement index, scoring high points for affordable cost of living, entertainment and amenities.

Next on the list were Panama, Mexico, Malaysia and Costa Rica, rounding out the top five nations in the index, which looks at eight criteria to determine the best countries to retire in.

Ecuador scored 92.7 out of 100 points, with top marks for climate, cost of renting or buying property and discounts on flights, public transportation and utilities offered by the government for retirees.

Panama is considered the best destination in Central America and offers a Pensionado visa, which is available to anyone with a lifetime pension of more than $1,000. The visa offers discounts on medical services, entertainment, meals, air fares, as well as electricity and phone bills.

Malaysia, the top retirement country in Asia, earned high scores for ease of fitting in, entertainment and amenities, as well as low cost of living. A meal with a bottle of wine can cost as little as $5 and a visit to the doctor just $15.

In Europe, sixth-place Spain was the top retirement nation thanks to its warm climate and low cost of living compared with other European countries. Spain scored top marks for infrastructure, a health care system recognized by the World Health Organization as one of the best in the world, and entertainment.

Portugal came in at No. 9, followed by Thailand, which won points for low health care costs, culture and affordable housing.