(AFP) US President Barack Obama and German Chancellor Angela Merkel made a joint pitch Sunday for deeper transatlantic trade in the face of mounting opposition, vowing to complete a vast US-EU trade pact that could spur much-needed economic growth.

After talks in the northern town of Hanover where tens of thousands marched Saturday against the planned deal, Obama said the world’s largest trade pact could be finalised by the end of the year.

“Angela and I agree that the United States and the European Union need to keep moving forward with the Transatlantic Trade and Investment Partnership negotiations,” Obama said.

“I don’t anticipate that we will be able to have completed ratification of a deal by the end of the year, but I do anticipate that we can have completed the agreement.”

Both sides hope the pact will provide a shot in the arm to Western economies that are still struggling to erode the devastating effects of the global financial crisis.

“As you see other markets like China beginning to develop and Asia beginning to develop and Africa growing fast, we have to make sure our businesses can compete.”

Merkel echoed that sentiment, saying the deal was “extremely helpful to allow our economy in Europe to grow”.

“It is good for the German economy, it is good for the European economy,” she said.

But Obama acknowledged there was popular opposition.

“People are unsettled by globalisation,” he said. “People visibly see a plant moving and jobs lost and the narrative develops that this is weakening rather than strengthening the position of ordinary people and ordinary workers.”

“The benefits often times are diffused.”

Ahead of the meeting there was a sign of the significant hurdles that remain.

Merkel’s Economy Minister Sigmar Gabriel warned the deal “will fail” if the United States refused to make concessions in “buy American” clauses.

– ‘Right side of history’ –

Merkel and Obama also discussed world crises including Syria and Libya.

On Syria, Obama defended his decision not to impose a safe zone that could help stem flows of migrants and refugees into Europe that have hurt Merkel politically.

“Sadly, it is very difficult to see how it would operate short of us essentially being willing to militarily take over a big chunk of that country.”

But he rushed to Merkel’s defence over the refugee crisis, saying she was on “the right side of history”.

Obama’s trip — perhaps his last official visit to Germany before leaving office in January — coincides with the Hanover Messe, a large trade fair that demonstrates German industrial prowess.

It follows stops in Saudi Arabia and Britain, where Obama plunged headlong into the debate over membership of the European Union.

Obama pitched in on the side of Prime Minister David Cameron, arguing that Britain would be lose influence and trade opportunities if citizens vote to leave the EU in a June referendum.

– Soul mates –

During his seven years in the Oval Office, the Democrat US president and the conservative German chancellor have grown closer and Obama sees her, among European leaders at least, as first among equals.

Aides describe a meeting of minds, two leaders who take a cerebral and analytical approach to politics.

“I have valued chancellor Merkel’s thinking and perspective on a whole range of global issues throughout my presidency,” Obama said.

“You have been a trusted partner throughout my entire presidency, longer than any world leader, and I value your judgement.”

Merkel echoed his sentiment at their joint press conference.

“What you see is friendly, close, trusting cooperation that I am very pleased with, also because it helps solve international problems.”

– Rocky road –

The pair will have dinner later Sunday, and Obama will wrap up his visit Monday with a keynote speech designed to frame his vision of transatlantic relations and a meeting with Merkel and the leaders of Britain, France and Italy.

Despite the diplomatic niceties, the relationship between Obama and Merkel has had its rocky moments.

Merkel has backed austerity as the remedy to European sovereign debt crises, while Obama came down firmly in favour of short-term spending to buy time and a way out of the economic downturn.

US-German relations hit a low when it emerged that the US government had been tapping Merkel’s phone.

But officials point to the Ukraine conflict as a turning point that helped both leaders begin to work in tandem.