Thousands of advocates of immigration reform lobbied Congress on Wednesday and rallied outside the Capitol supporting a law that would offer a path to citizenship for up to 11 million people who are in the country illegally.

Organizers of the Rally for Citizenship hope to create a sense of momentum and inevitability for immigration reform, particularly after an election that drove home the growing influence of Hispanic voters.

A bipartisan group of senators is finalizing an agreement on a comprehensive proposal to overhaul the nation’s immigration law for the first time since 1986. It should be made public next week, aides said, and advance to the Senate floor for a vote before Memorial Day. But several hurdles remain, especially in the ­Republican-controlled House, where most of the GOP has expressed opposition to allowing illegal immigrants to become citizens.

Sen. Robert Menendez (D-N.J.), one of the eight senators working on an agreement, spoke at the rally and predicted that a compromise Senate bill would become law by the end of the year.

“It is in the nation’s interest, in the economic interests of the United States and in the security interests of the United States,” said Menendez, who described how many immigrants pick fruit, pluck chickens and care for the elderly.

Many in attendance spoke as if history and politics were on their side.

“We’ve been through this before, but this time it’s different,” Gustavo Torres, executive director of CASA of Maryland, told the tightly packed crowd on the west lawn of the Capitol. “We are different, and Washington is different. The politicians can’t ignore us now. We will become citizens, and we will vote.”

Farm workers from California and housecleaners from Alabama were among hundreds of Latino immigrants who fanned across Capitol Hill to deliver their message. Felipe Herrera, 37, a construction worker who came from Arkansas, said their message to members of Congress was clear and simple: “We work and pay taxes and send our kids to school, and we want fair treatment. A lot of Latinos voted for Democrats, and now the Republicans see they need to change.”

Many in the crowd held up signs that read, “Dividing families is immoral!” and “I was born on Earth, how am I an alien?!” They waved flags from Mexico, Brazil and El Salvador, as well as the American flag.

Their frustration over roadblocks in immigration reform was on the surface. Roxana Euceda, 35, a cashier who lives in Gaithersburg and came to the United States from Honduras as an 8-year-old, said she remembers the fear she experienced as an undocumented immigrant.

“Now I’m a U.S. citizen and my children were born here, but now my husband is in an illegal situation,” she said.

“I know they’re taking the time because they have to see all different points of view,” she added. “But it’s taking a little too long.”

Several said the debate has dragged on too long.

“For me, they’re just talking, talking, talking,” said Daniel Yepes, 23, who moved to the United States from El Salvador six years ago and traveled from Boston to attend. “We want to stop the deportations. We want our families to stay together.”

On another corner of the Capitol grounds, apart from the rally, a small group of opponents held up placards saying “Secure the Border” and “No Amnesty.” They said legalizing millions of undocumented immigrants would allow them to compete unfairly with American workers.

Joe Guzzardi, a retired teacher from Pittsburgh, started to explain his concern that illegal immigrants might have an unfair advantage when it comes to jobs and education, but he was drowned out by a group en route to the march chanting “Yes we can” in Spanish.

Guzzardi predicted this attempt at immigration reform would fail, too. He said there were so many sticking points, including how many visas to give to skilled and unskilled foreign workers, that any broad measure would probably “collapse under its own weight.”

Under the terms of the proposed bill, immigrants living unlawfully in the United States could earn green cards in 10 years and citizenship in 13 years if they meet certain requirements, including learning English, paying fines and back taxes and remaining employed.

Obama, who has made immigration reform a priority of his second-term after winning 71 percent of the Latino vote in the fall, has vowed to introduce his own bill if the senators are unable to produce a proposal this month.

“I believe that we can get comprehensive immigration reform passed,” Obama said during a fundraiser in Atherton, Calif., last week. “If we push hard and we stay focused, we’ve got the opportunity to get this done over the next couple of months.”

Lawmakers initially hoped to have a proposal in March, then in early April. Meanwhile, immigration advocates say, 1,000 people a day are being deported. Obama has told the advocates that he will not order a stop to the deportations, because that would anger the GOP at a time when he is counting on its support for a comprehensive bill that includes a path to citizenship.

David Nakamura contributed to this report.