This post has been updated.

U.S. Senate candidate Tim Kaine paid a visit to the City by the Bay Wednesday.

President Obama holds a news conference with Tim Kaine (D-Va.) in 2009 (Linda Davidson — The Washington Post)

Obama not only recognized Kaine but heaped praise on him, calling him one of his “dearest friends,’’ according to a White House transcript.

“We’ve got a guy who I guess is a little bit of a carpetbagger here today,’’ Obama told the crowd. “He is former chairman of the DNC, former governor of Virginia, now running for the United States Senate in Virginia, but is also one of my dearest friends.”

“This was the first guy outside of Illinois, the first elected official outside of Illinois to endorse my candidacy for President,’’ Obama continued. “And we made that announcement together in Richmond, the seat of the former Confederacy. And this was at a time when Barack Hussein Obama was not favored to win. And so he is a man of character. And I would urge all of you to get to know his incredible track record and support his terrific efforts in Virginia. Please give Tim Kaine a big round of applause.”

Also in attendance:California Gov. Jerry Brown and baseball Hall of Famer Willie Mays, who introduced Obama.

Obama flew to California for a series of fundraisers. He expected to pick up $2 million during his four-hour trip in San Francisco, according to the San Francisco Chronicle.

We hear Kaine was in San Francisco to raise a little bit of money for his own race and stopped by Obama’s event.

Virginia Republicans, including Republican George Allen, have made Kaine’s relationship to Obama a key point of attack during the Senate race, though Kaine has disagreed with Obama on some policy issues.

Kaine spokeswoman Brandi Hoffine on Thursday declined to release details about the San Francisco trip, only commenting about fundraising generally. “We're thrilled that we continue to out-raise George Allen among both Virginia donors and grassroots, low-dollar donors by wide margins,” she said.