SANTA MONICA, Calif. – Meg Whitman’s campaign for governor was thrown into turmoil Thursday as the Republican sought to fend off accusations that she knowingly had an illegal immigrant housekeeper on her payroll for nearly a decade.

Whitman denounced the allegations as a “baseless smear attack” by Democratic challenger Jerry Brown in what has become a dead-heat race five weeks before the election.

The central issue is whether Whitman knew about a letter that the Social Security Administration sent her in 2003 that raised discrepancies about the housekeeper’s documents — a possible tip-off that she could be illegal.

The letter is the foundation for claims by former maid Nicky Diaz Santillan that Whitman and her husband knew for years she was in the country illegally, but kept her on the job regardless.

For two days, Whitman forcefully denied receiving any such letter and said she fired the $23-an-hour housekeeper last year immediately after learning she was illegal. But Whitman’s husband changed course Thursday after a letter surfaced with what appeared to be his handwriting, forcing him to say he may have been aware of the correspondence back in 2003.

The husband’s shift only served to intensify the uproar in a contest that until now had been focused on job creation, government spending and education in a state with a $19 billion deficit and 12.4 percent unemployment.

Now, the focus is on how convincingly the billionaire GOP nominee can respond to the allegations, brought by a celebrity lawyer and her mysterious housekeeper client.

Revelations about the illegal housekeeper have thrown Whitman’s carefully managed campaign off track and opened the door for Democrats to accuse her of hypocrisy.

The former eBay chief executive has called for tougher sanctions against employers who hire illegal workers, and the fact that she employed an illegal immigrant maid from Mexico for nine years could undermine her credibility. She has also spent millions courting Latino voters, who could play a key role in determining the outcome of the race.

The housekeeper and her lawyer, Gloria Allred, produced a copy of the letter Thursday that they say shows Whitman’s husband, Dr. Griffith Harsh III, partially filled it out and told the housekeeper to “check on this.”

Allred said the housekeeper recognized the writing as that of Whitman’s husband, and a handwriting specialist may be brought in to analyze his penmanship. Allred claims it could prove that Whitman and her husband knew years earlier that Diaz Santillan might be illegal while working at their Silicon Valley mansion.

In a statement released by the campaign, Harsh said he did not recall receiving the letter, although it’s possible he scratched out a note asking Diaz Santillan to follow up. He noted, however, that the letter does not say Diaz Santillan is illegal — it merely asks for more information.

“The essential fact remains the same: Neither Meg nor I believed there was a problem with Nicky’s legal status,” Harsh said. “The facts of this matter are very clear. Ms. Diaz broke the law and lied to us and to the employment agency.”

Campaign adviser Rob Stutzman said “it’s reasonable” the letter could be authentic, but added the campaign has questions about its whereabouts for seven years and if it is legitimate. At one point Thursday, the campaign said that Diaz Santillan may have intercepted the letter since she was in charge of the mail at the house.

The story has consumed two full days of news cycles just as Whitman and Brown are preparing for a Saturday Spanish-language debate that will include questions of importance to the Hispanic community.

One of the state’s largest public employee unions released a Spanish-language attack ad accusing Whitman of a double standard on illegal immigration.

Whitman, who has revealed few details about her personal life since announcing her first run for office last year, was forced to spend 45 minutes answering questions from reporters about what she knew and when she knew it, her husband standing awkwardly by throughout.

“You know, I’ve only been in politics for two years. I’m just getting used to the smear politics, I’m just getting used to the politics of personal destruction,” she told dozens of reporters hastily gathered at a hotel in Santa Monica.