Chinese Premier Li Keqiang (L) and Peru's President Ollanta Humala shake hands at the government palace in Lima Thomson Reuters BEIJING (Reuters) - China and Peru have agreed to study the feasibility of a controversial 5,300 km (3,300 miles) transcontinental railroad that will connect Peru's Pacific coast with Brazil's Atlantic coast, China's official Xinhua News Agency reported.

The agreement came as Chinese Premier Li Keqiang arrived in Peru, on the third leg of a Latin America visit. This week, Brazil and China agreed on a feasibility study for the rail link.

The proposed railway would span the Andes to the Pacific and reduce the cost of shipping grain and minerals to Asia. China and Latin America would each benefit from the project by upgrading infrastructure, while allowing China to export its "industrial capacity" and investment, the news agency said.

In January, Chinese President Xi Jinping pledged $250 billion in investment in Latin America over the next 10 years as part of a drive to boost resource-hungry China's influence in a region long dominated by the United States.

Li oversaw a raft of agreements during his visit to Brazil this week, ranging from a $1 billion purchase of passenger jets made by Brazil's Embraer to the lifting of an export ban on Brazilian beef.

Li, who arrived in Peru on Friday, is scheduled to hold talks with Peruvian President Ollanta Humala and attend a joint news conference. He will later travel to Chile.

(Editing by Robert Birsel)