Colombia, long known as little more than the world's kidnapping capital and home to Latin America's longest-running guerrilla war, is attracting tourists at record numbers because of better security.

The Ministry of Commerce, Industry and Tourism said that in the first half of this year Colombian cities attracted more than 560,000 foreign visitors, up 17.6 percent from the same time in 2006.

Urban crime rates have plummeted and highways are safer under President Alvaro Uribe, who won re-election last year based on his U.S.-backed fight against drug-running Marxist rebels.

The paradox of Colombia is that we have good urban security and good tourism infrastructure while the rural areas are crowded with rebels, paramilitaries and drug smugglers, said Pablo Casas, an analyst at Bogota think tank Security and Democracy.

Guerrillas still control wide swathes of countryside and right-wing paramilitaries extort farms and businesses in many areas of Colombia. But that is not stopping more and more tourists, mostly Americans, from visiting cities like Medellin, notorious in the 1980s for its violent cocaine cartel.

This Andean country remains the world's top cocaine producer and thousands are killed in the war every year.

(Reporting by Hugh Bronstein)