Karzai made the unusual statement at a closed-door meeting Saturday with selected lawmakers - just days after with remarks alleging foreigners were behind fraud in last year's disputed elections.
Lawmakers dismissed the latest comment as hyperbole, but it will add to the impression the president - who relies on tens of thousands of U.S. and NATO forces to fight the insurgency and prop up his government - is growing increasingly erratic and unable to exert authority without attacking his foreign backers.
Special Report: Afghanistan
"He said that 'if I come under foreign pressure, I might join the Taliban'," said Farooq Marenai, who represents the eastern province of Nangarhar.
"He said rebelling would change to resistance," Marenai said - apparently suggesting that the militant movement would then be redefined as one of resistance against a foreign occupation rather than a rebellion against an elected government.
Marenai said Karzai appeared nervous and repeatedly demanded to know why parliament last week had rejected legal reforms that would have strengthened the president's authority over the country's electoral institutions.
Two other lawmakers said Karzai twice raised the threat to join the insurgency.
The lawmakers, who spoke on condition of anonymity for fear of political repercussions, said Karzai also dismissed concerns over possible damage his comments had caused to relations with the United States. He told them he had already explained himself in a telephone conversation Saturday with Secretary of State Hillary Rodham Clinton that came after the White House described his comments last week as troubling.
The lawmakers said they felt Karzai was pandering to hard-line or pro-Taliban members of parliament and had no real intention of joining the insurgency.
Nor does the Afghan leader appear concerned that the U.S. might abandon him, having said numerous times that the U.S. would not leave Afghanistan because it perceives a presence here to be in its national interest.
Karzai spokesman Waheed Omar's phone was turned off and another number for him rang unanswered Monday. Deputy spokesman Hamed Elmi's phone rang unanswered.
The comments come against the background of continuing insurgent violence as the U.S. moves to boost troop levels in a push against Taliban strongholds in the south.
NATO forces said they killed 10 militants in a joint U.S.-Afghan raid on a compound in Nangarhar province's Khogyani district near the Pakistani border early Monday, while gunmen seriously wounded an Afghan provincial councilwoman in a drive-by shooting in the country's increasingly violent north.
NATO also confirmed that international troops were responsible for the deaths of five civilians, including three women, on Feb. 12 in Gardez, south of Kabul.
A NATO statement said a joint international-Afghan patrol fired on two men mistakenly believed to be insurgents. It said the three women were "accidentally killed as a result of the joint force firing at the men."
International force officials will discuss the results of the investigation with family of those killed, apologize and provide compensation, he said.
The two men killed in the Gardez raid had been long-serving government loyalists and opponents of al Qaeda and the Taliban, one serving as provincial district attorney and the other as police chief in Paktia's Zurmat district.
Their brother, who also lost his wife and a sister, said he learned of the investigation result from the Internet, but had yet to receive formal notice.
Mohammad Sabar said the family's only demand was that the informant who passed on the faulty information about militant activity be tried and publicly executed.
"Please, please, please, our desire, our demand is that this spy be executed in front of the people to ensure that such bad things don't happen again," Sabar said.
In the latest of a series of targeted assassination attempts blamed on militants, Baghlan provincial council member Nida Khyani was struck by gunfire in the leg and abdomen in Pul-e Khumri, capital of the northern province, said Salim Rasouli, head of the provincial health department. Khyani's bodyguard was also slightly injured.
There was no immediate claim of responsibility for the shooting, although suspicion immediately fell on Taliban fighters who often target people working with the Afghan government and their Western backers.
One month ago, a member of the Afghan national parliament escaped injury when her convoy was attacked by Taliban insurgents in eastern Afghanistan. Female government officials regularly report receiving threats to their safety. Some women leaders, including a prominent policewoman, have been assassinated.
The Taliban rigidly oppose education for girls and women's participation in public affairs, citing their narrow interpretation of conservative Islam and tribal traditions. Militants, who are strongest in the south and east, carry out beatings and other punishments for perceived women's crimes from immodesty to leaving home unaccompanied by a male relative.
Also Monday, the organizer of a national reconciliation conference - known as a jirga - scheduled for early May said it would not include insurgent groups such as the Taliban. There has also been indications it would include discussion of the withdrawal of 120,000 foreign troops in the country.
Ghulam Farooq Wardak, the minister of education who is organizing the conference, said it will focus on outlining ways to reach peace with the insurgents and the framework for possible discussions.
Out of the jirga will come the "powerful voice of the Afghan people," Wardak said. "By fighting, you cannot restore security. The only way to bring peace is through negotiation."