European governments have decided in principle to impose an oil embargo on Iran but plan to delay its implementation for six months or more so that vulnerable countries can arrange for alternate supplies, according to European diplomats.

The agreement, reached at a meeting of European Union ambassadors Thursday in Brussels, has to be confirmed in European capitals and ratified by foreign ministers at a meeting scheduled for Jan. 23. It is designed to dilute the painful effects of an oil embargo for Europeans while seeking to maintain the gesture’s political impact.

The United States has been trying to build worldwide agreement on reducing or halting Iranian oil exports, which amount to an estimated 450,000 barrels a day. The goal is to pressure Iran into opening its nuclear development program to meaningful inspection by the United Nations’ nuclear watchdog, the International Atomic Energy Agency.

Under the agreement, Greece, Italy and Spain — the three E.U. countries that are particularly dependent on Iranian oil imports — would be exempted from the embargo for even longer than six months, the diplomats said.

Greece, Italy and Spain account for almost all European oil imports from Iran, with Greece counting on Iran for 22 percent of its imports, Spain almost 10 percent and Italy 13 percent. By comparison, France, which pushed for an immediate implementation of the embargo, buys less than 4 percent of its oil from Iran.

Iranian Vice President Mohammed Reza Rahimi threatened last month to close off the Strait of Hormuz, through which more than 20 percent of the world’s petroleum supplies pass, if the U.S.-promoted embargo succeeds in choking off oil exports from the increasingly isolated Islamic republic.

Such a move, which would limit exports by other major producers such as Saudi Arabia, was described by Defense Secretary Leon E. Panetta as a red line that the United States would not allow Iran to cross.

The finance minister of Japan, Iran’s second-largest customer, pledged Thursday to cut back its purchases of Iranian oil but without saying how much or when. On Friday, Prime Minister Yoshihiko Noda said the decision was not yet final, the Associated Press reported.

Japan imports about 10 percent of its oil from Iran, down from 40 percent five years ago. The finance minister’s announcement was made during a visit to Tokyo by Treasury Secretary Timothy F. Geithner, who was on a tour seeking commitments from China and South Korea, in addition to Japan.

China, the largest purchaser of Iranian oil, has steadfastly declined to jump onto the U.S. bandwagon. But according to U.S. officials, China has reduced its reliance on Iranian imports in recent months. An imminent visit to other Persian Gulf oil-exporting nations by Premier Wen Jiabao is being seen as a chance for the Chinese leader to prospect for alternate sources of oil.

China has enormous energy needs as its economy grows, and arranging for a steady supply of petroleum has become a major concern of the Beijing government in recent years. In addition, China traditionally has been reluctant to impose sanctions on other nations, regarding them as interference.

In Europe, Greece, Italy and Spain would use the time during which they would be exempted from the embargo to find other oil sources or win financial compensation for their losses, said a European diplomat, who spoke on the condition of anonymity.

Halting oil imports from Iran would be particularly painful for the heavily indebted Greek government, which gets much of its Iranian oil on easy credit terms. Italy also would be hard-pressed to do without Iranian oil, because much of its import quota comes in the form of repayment of debts contracted earlier by the Iranian government.

The accord reached in Brussels represents a compromise between those concerns and the desire by other nations, particularly France and Germany, that want to strike out hard at Iran. Officials in Brussels told reporters that if the embargo is formally approved and declared on Jan. 23, there will be periodic reviews to see whether Italy, Spain and Greece have arranged for alternate sources of oil and can join in.

European officials have said the embargo is a necessary step to persuade Iran to open up for IAEA inspections and reassure the world about its nuclear program. This is considered particularly urgent since Iran’s recent announcement of the start of operations at a second, underground nuclear refinement plant that, according to Western experts, increases the likelihood that the government will soon be able to produce nuclear weapons.

Israel has warned that it views the prospect of Iran possessing the weapons as an unacceptable threat, leading to predictions it might try to bomb Iran’s nuclear facilities to slow down the program. Any such attack would draw strong retaliation, the Iranian government has warned.

Tensions between Iran and the West have increased in recent days, with the mysterious assassination of an Iranian nuclear scientist Wednesday and the death sentence imposed in Tehran on an American Iranian citizen accused of being a spy.