BAGHDAD — Truck by truck, border post by border post, a power struggle is unfolding between Iraq and Iran over when to reopen the frontier between the two countries, which Iraq closed five weeks ago to limit the spread of the coronavirus.

Iran, which has been hit hard by the virus but needs trade with Iraq to help stabilize its economy, wants it reopened immediately.

Iraq, which fears opening the border to the region’s most heavily infected country, is resisting.

The dispute comes at a time of mounting pressure in Iraq to reduce Iran’s influence, which has been an increasingly powerful force in Iraqi affairs since the United States and its allies overthrew the government of the Iraqi dictator Saddam Hussein in 2003.

The coronavirus first arrived in Iraq from Iran, and only through strenuous efforts has Iraq kept its caseload relatively low, with only 82 deaths attributed to the virus by Monday.