The question of Russian financial aid for Greece was not discussed during talks between the leaders of the two countries in St Petersburg, officials said.

Greek prime minister Alexis Tsipras had travelled to Russia as his country struggles to reach a deal with its creditors for new loans it needs to avoid defaulting on debt payments at the end of the month.

The visit gave rise to speculation that the Greeks may be seeking Russian loans.

Mr Putin's spokesman Dmitry Peskov said ahead of the talks that Russia would consider a loan if the Greeks asked for one.

But when Mr Tsipras met with the Russian leader, Mr Peskov said the possibility of a loan "wasn't discussed".

Both sides spoke about "the necessity of developing investment cooperation".

The talks were held after both leaders addressed investors and Russian government officials at Russia's biggest annual economic forum.

Mr Putin made no mention of Greece's predicament in his remarks, while Mr Tsipras said his country strove to be a "bridge of cooperation" with "traditional friends like Russia" and others.

"As you all know, we are now in the middle of a great storm," the Greek leader said. "But we are a seafaring nation that knows how to navigate through storms and is not afraid of heading to new seas and reaching new harbours."

Deputy prime minister Arkady Dvorkovich had also said Russia would consider a loan to Greece.

"The most important things for us are investment projects and trade with Greece. If financial support is needed, we will consider this question," he said in an interview on RT television.

On the sidelines of the investment forum, Russia and Greece signed a deal Friday to build an extension of a prospective gas pipeline that would carry Russian gas to Europe through Turkey.

Russia promised Greece hundreds of millions of dollars in transit payments yearly if it agreed to build the pipeline. Construction of the pipeline is expected to start next year and be completed in 2019.

Russian energy minister Alexander Novak said Russia and Greece would be equal partners in the project, with Russia's half owned by the state bank VEB.

Economic development minister Alexei Ulyukayev said during a forum session that Russia has no plans to buy Greek bonds, but is ready support the Greek economy by stimulating investment by Russian companies.

He pointed to the gas pipeline as an example.

Mr Tsipras started his day by speaking to Russians of Greek ancestry at a memorial to Ioannis Kapodistrias, the founder of the modern Greek state who lived and worked in Russia as a Greek envoy from 1809 to 1822.

"We are starting a new era in Greek-Russian relations and we consider you who live here to be playing a very important part in this effort," Mr Tsipras said.

"Greece has been waging a brave fight in these past few weeks and months. You are well aware of these types of difficulties and you are now standing on your feet.

"This is the key characteristic of the Greek people, to be able to overcome difficulties when right is on their side."