Both countries fell on Reporters Without Borders' annual ranking of media freedom.
The United States came in for rare praise from the Paris-based group, rising from No. 40 on last year's ranking to No. 20 this year. The group attributes the rise to more relaxed attitudes toward the media under President Barack Obama.
But it warned, "The attitude of the United States toward the media in Iraq in Afghanistan is worrying," noting that a number of journalists were arrested or injured by the US military over the year period ending August 31.
The group, also known by its French acronym RSF, looks at attacks, arrests, laws and overt or covert censorship in determining its list.
European countries led the list of 176 countries, with Denmark, Finland and Ireland the top three. The bottom three countries remained unchanged from the previous ranking: Eritrea, North Korea and Turkmenistan.
Just above them was Iran, at 172nd, falling after protests following June presidential elections that saw a crackdown on media coverage.
In a bid to restrict information about the protests, Iran's government barred foreign media from reporting and taking pictures and video on the streets, and authorities blocked many online reports and arrested several bloggers and journalists.
"Automatic prior censorship, state surveillance of journalists, mistreatment, journalists forced to flee the country, illegal arrests and imprisonment - such is the state of press freedom this year in Iran," the report says.
The group also criticized Israel for restricting journalists during the offensive in the Gaza Strip. Israel sank to 93rd place overall.
"This nose-dive means it has lost its place at the head of the Middle Eastern countries," the group said. Israel is now ranked behind Kuwait, the United Arab Emirates and Lebanon.
RSF said three journalists were killed covering the Gaza offensive, 20 wounded by Israeli forces and five were arrested.
"Press freedom must be defended everywhere in the world with the same energy and the same insistence," Reporters Without Borders secretary-general Jean-Francois Julliard said in the report.