SEOUL, South Korea  South Korea’s entire cabinet offered to resign on Tuesday as President Lee Myung-bak struggled to find a breakthrough in the biggest political crisis to face his young government, one set off by fears that an agreement to reopen markets to American beef could expose the public to mad cow disease.

Prime Minister Han Seung-soo and other cabinet members submitted their resignations to Mr. Lee hours before tens of thousands of South Koreans were scheduled to rally in downtown Seoul in what organizers said would be the largest demonstration to be held against the president and his 107-day-old government.

For the past 40 days, downtown Seoul has been rocked daily by demonstrations. What had started as a rally by hundreds of teenage students holding candles to protest the importing of American beef has evolved into a broad demonstration against government policies, with students, homemakers and workers chanting “Out with Lee Myung-bak!”

On Tuesday Cho Hang-nam, a spokesman for Mr. Han, said, “The prime minister offered the resignations on behalf of cabinet members when he met President Lee this morning.”