US President Barack Obama has praised Ethiopia as an "outstanding partner" in the fight against militant Islamists.
Its troops had played a key role in weakening the al-Qaeda-linked al-Shabab group in Somalia, Mr Obama said.
He was speaking after talks with Ethiopia's PM Hailemariam Desalegn, during the first ever visit by a US president to the East African state.
He also called on Mr Hailemariam to improve Ethiopia's record on human rights and good governance.
"I don't bite my tongue too much when it comes to these issues," he said at a joint press conference in the capital, Addis Ababa.
Some rights groups have criticised Mr Obama's visit, warning that it could lend credibility to a government accused of jailing journalists and critics.
A legal case currently being fought through the US courts alleges that agents of the Ethiopian government eavesdropped on the internet activities of a man in the US state of Maryland.
The man, born in Ethiopia and now a US citizen, works for a political opposition group outlawed in his home country.
Addressing the media, Mr Obama described the Ethiopian government, which won all parliamentary seats in May's election, as "democratically elected".
Opposition group have said the poll was rigged.
'Democracy commitment not skin-deep'
Mr Hailemariam said Mr Obama's visit had taken a century-long relationship with the US to a "new height".
"Our commitment to democracy is real, not skin-deep," he added.
Answering a question about press freedom, Mr Hailemariam said Ethiopia wanted "civilised journalism", and not reporters linked with "violent terrorist groups".
On the security threat by al-Shabab, Mr Obama said there had been a "shrinkage" of the group since the deployment of regional troops to Somalia, its main base.
However, the killing of 15 people in a bomb attack on a hotel in Somalia's capital, Mogadishu, on Sunday was a reminder that "we have to now keep the pressure on", he said.
"We don't need to send our own marines in to do the fighting: The Ethiopians are tough fighters and the Kenyans and Ugandans have been serious about what they're doing."
Mr Obama flew to Ethiopia after a two-day visit to Kenya where he had discussed trade and security but also called for greater human rights and warned of the dangers of corruption.
At the scene: Karen Allen, BBC News, Addis Ababa
Compared to the Kenyan leg of his tour, President Obama's arrival in Ethiopia has signalled a more sombre mood. After talks in the ornate setting of the presidential palace, Mr Obama sought to highlight the areas of agreement with his host and tread cautiously over the delicate issue of democratic rights.
He praised Mr Hailemariam for the country's contribution to peacekeeping efforts in the region, and said the US wanted to help "sustain momentum" on Ethiopia's impressive rates of economic growth. Addis Ababa has undergone a massive building boom, thanks in part to substantial Chinese investment
But on the thorny issue of press freedom, much still divides the pair. Mr Obama said it was a "significant topic of discussion", and insisted that a vibrant and free press would strengthen rather than inhibit Ethiopia's development. For his part, the prime minister called for "civilised journalism" and said Ethiopian journalists needed training.
Mr Obama also referred to the civil war in South Sudan ahead of talks with regional leaders on the issue.
Government and rebels leaders were "extremely stubborn", and other "tools" would have to be considered if there was no breakthrough in ending the conflict, he added.
The 19-month war in South Sudan has left thousands of people dead and displaced more than two million.
On Tuesday, Mr Obama will also be the first US leader to address the 54-member African Union in Addis Ababa.