By Stefanie Eschenbacher and Elida Moreno

PANAMA CITY (Reuters) - Panama's president-elect, Laurentino "Nito" Cortizo, said the United States should pay more attention to Central America or risk losing ground to China, which has won diplomatic support and increased its investment in the region in recent years.

Cortizo, of the center-left Democratic Revolution Party (PRD), won Sunday's unexpectedly close presidential election with 33 percent of the vote and a 2 point gap over his nearest rival, the electoral tribunal said.

The U.S.-educated former agriculture minister and businessman said that if the United States neglected a region it has long considered its backyard, it was inviting China to fill the gap.

"We need, and we have asked, that they look toward the region more - the region, not just Panama," Cortizo said in an interview with Reuters before voting on Sunday.

"They need to pay more attention," he added. "While they're not paying attention, another one is making advances."

While U.S. President Donald Trump has berated Central American countries for not doing enough to stem waves of migration toward the United States, Beijing has courted governments with infrastructure financing and investment.

Trump recently ordered that aid be cut off to El Salvador, Guatemala and Honduras in retaliation for a surge in asylum seekers.

Panama and China opened diplomatic ties in 2017, after the isthmus nation famous for its shipping canal cut its alliance with Taiwan, the self-governing island that China considers a renegade province.

Panama has long been of strategic interest to powerful nations, with its trans-oceanic canal one of the world's key trade routes that enables, for example, Chinese products to reach the U.S. east coast.

China's interest and Washington's discomfort carries echoes of the Cold War, when the United States and the Soviet Union struggled for influence in Central America, leading to bloody conflicts.

Following Panama's diplomatic switch, both El Salvador and the Dominican Republic switched allegiances to China from Taiwan. Honduras has signaled it could follow suit, citing Trump's retreat from investment and aid pledges.

The United States has responded angrily to those developments, saying El Salvador's decision was "of grave concern" and criticizing projects signed with Panama as opaque.

Panama and China signed 19 cooperation agreements on trade, infrastructure, banking, tourism and other areas last December when Chinese President Xi Jinping visited Panama. [nL1N1Y81U9]

Panama's next president will have to balance the competing interests of both superpowers.

Cortizo said he had already had frank conversations with the Chinese ambassador to Panama, in which he reiterated that his government wanted to advance commercially with China, but that it would have to be benefit both countries.

(Reporting by Stefanie Eschenbacher and Elida Moreno in Panama City; Editing by Frank Jack Daniel, Peter Cooney and Michael Perry)