Seiichi Ota's departure only seven weeks after he took office was a further embarrassment to the teetering government of Prime Minister Yasuo Fukuda, who announced recently his own resignation amid a parliamentary stalemate.
"I met with Prime Minister Fukuda and told him my decision to resign, considering the seriousness of the tainted rice problem for society," Ota said. Chief Cabinet Secretary Nobutaka Machimura will take over as interim farm minister, the government said.
Japanese consumers have been horrified in recent weeks over the discovery that contaminated rice intended for industrial uses such as the manufacture of glue had been distributed instead as food to thousands of people.
The rice, imported from China, Vietnam and the United States was shipped to food companies, schools, day-care centers and nursing homes, the government said. News reports said it was also discovered in rice balls sold at convenience stores.
"We deeply regret causing worries over food safety. We recognize that this is a very serious situation," Machimura told a news conference.
The rice was tainted with the pesticide methamidophos at concentrations that exceeded government regulations, but were too low to threaten anyone's health, officials say. There have been no reports of anyone getting sick from the rice.
The discovery is the latest in a string of food scandals including the false labeling of meat, vegetables and sweets, and Chinese-made dumplings that sickened at least 10 people in Japan.
On Thursday in China, hundreds of parents, some cradling infants, converged on the company at the heart of a, demanding refunds and asking what they can safely feed their children.
Ota's resignation comes just days before the ruling Liberal Democratic Party's election Monday to choose a new president. The winner is expected to be elected by parliament to succeed Fukuda two days later.
Japan's top opposition party, the Democratic Party of Japan, said the resignation was an attempt by the ruling party to halt damage from the scandal before calling parliamentary elections, possibly later this year.
The LDP "must have figured they cannot win elections" without firing Ota, DPJ Secretary-General Yukio Hatoyama told reporters.
The rice scandal has been particularly damaging in Japan, where consumers are notoriously finicky about food safety. One distributor apparently involved in the sales reportedly committed suicide this week.
The government so far has tracked down a rice trader in Osaka, western Japan, who shipped the tainted rice to about 370 food companies, including liquor and sweets makers.
But local reports have said several chemical companies, including a glue maker, also shipped tainted rice as food, and an agriculture ministry official said Friday the government has yet to "grasp the full scope" of the rice scandal.
The agriculture ministry has been rocked repeatedly by scandals in recent years, starting when then-farm minister Toshikatsu Matsuoka committed suicide in May 2007. Ota was the fifth minister to take the post in the past two years, not including caretakers who watched over the ministry for short periods.