US President Barack Obama said Thursday he was more upbeat about the prospects of immigration reform making it through Congress than tougher gun control legislation.

"I am very optimistic that we get immigration reform done in the next few months," Obama told Democratic donors at an event in Atherton, California, a Silicon Valley town south of San Francisco.

"And the reason I'm optimistic is because people spoke out through the ballot box, and that's breaking gridlock," added Obama, who seized 70 percent of the country's Latino vote when he was re-elected last November.

This electoral arithmetic has prompted some Republican lawmakers to support immigration reform. A group of eight senators from both parties recently set the groundwork for agreement on a bill aiming to help some 11 million illegal immigrants emerge from the shadows.

However, "it's going to be tougher to get better gun legislation to reduce gun violence through the Senate and the House that so many of us I think want to see, particularly after the tragedy in Newtown," Obama said.

"But I still think it can get done if people are activated and involved."

In mid-December, 26 people -- including 20 children -- were gunned down at an elementary school in Newtown, Connecticut, giving fresh impetus to the issue of gun control legislation reforms.

But this endeavor now appears to be in peril, with the legislative language being discussed in Congress slowly sapped of substance due to resistance from lawmakers, including the president's Democratic allies who balk at the idea of being seen as encroaching on the right to keep and bear arms, as protected by the Constitution.

Seeking to regain momentum, Obama on Wednesday traveled to Colorado, a western state with a strong hunting tradition and frontier spirit, which nevertheless passed new gun laws after a mass shooting in a movie theater killed 12 people last year.

He is now directing his efforts on a plan, opposed by many Republicans, some conservative Democrats and the powerful gun lobby, to require background checks for all gun purchases.