German Chancellor Angela Merkel (R) and Russian President Vladimir Putin (L) arrive to the plenary session at the G20 Summit on July 7, 2017.

Russian President Vladimir Putin said at a meeting with German Chancellor Angela Merkel on Friday that he would stand up to any attempts by U.S. President Donald Trump to block a Russian-German gas pipeline project.

Berlin and Moscow have been at loggerheads since Russia's annexation of Crimea four years ago, but they share a common interest in the Nordstream 2 pipeline project, which will allow Russia to export more natural gas to northern Europe.

A U.S. government official this week said Washington had concerns about the project, and that companies involved in Russian pipeline projects faced a higher risk of being hit with U.S. sanctions.

"Donald is not just the U.S. president, he's also a good, tough entrepreneur," Putin said at a news conference, alongside Merkel, after the two leaders had talks in the Russian Black Sea resort of Sochi.

"He's promoting the interests of his business, to ensure the sales of liquefied natural gas on the European market," Putin said.

"I understand the U.S. president. He's defending the interests of his business, he wants to push his product on the European market. But it depends on us, how we build our relations with our partners, it will depend on our partners in Europe."

"We believe it (the pipeline) is beneficial for us, we will fight for it." Merkel, who earlier in the day received a bouquet of pink and white roses from Putin as she arrived at his residence in Sochi, also hinted at tensions between Berlin and the Trump administration.

As well as the differences over Nordstream, European capitals are at odds with Washington over Trump's decision to withdraw from the Iranian nuclear deal. Moscow shares Europe's position on the deal.

"Germany, Britain, France, and all our partners in the European Union continue to support this deal and remain in this deal and we know that a very specific situation arose that we Europeans need to discuss with Iran," Merkel said at the news conference.

"I know that the deal is anything but perfect but it is better than no deal."

Asked about differences with the United States, Merkel told reporters: "We have a strong transatlantic friendship, which during its history has had to withstand many questions of different opinions, and I think that might be the case now as well."

"But this does not challenge the intensity of the transatlantic relationship," she said.

Some commentators have said that a shared opposition to Trump's stances on Iran and other issues could lead to a rapprochement between Europe and Russia, repairing a relationship badly damaged by the Ukraine conflict.

Putin's remarks about Trump were unusually forthright. While the Russian leader is frequently critical of U.S. policy, Putin has always been respectful in his comments on Trump, with whom Kremlin officials say he has built up a personal rapport.