Shabad Bharara was thrilled to land an internship in U.S. Sen. Richard Blumenthal’s Hartford office in the summer of 2017. He was less enthusiastic to receive no financial compensation for his work.

“The experience was great,’’ said Bharara, who lives in Morris and is now a junior majoring in communication, legal institutions, economics and government at American University in Washington. “But I don’t think unpaid internships are the way to go.”

Internships on Capitol Hill and in district offices across the U.S. have long been coveted by ambitious college students, who view such experiences as crucial entry points into the world of government and politics. Yet since the 1990s, most members of Congress, including most of the Connecticut delegation, have not paid their interns, which means those who can afford to accept the unpaid posts are mainly well-off students, especially given Washington’s steep cost of living.

That’s about to change: Earlier this year, Congress approved a budget that allocates money to pay House and Senate interns.

“Unpaid internships are not just a D.C. problem, but we believe Washington can set an example for everyone else,’’ said Guillermo Creamer Jr., a former congressional intern and co-founder of Pay Our Interns, a Washington-based not-for-profit advocacy group that pressed for the funding.

The issue of paying congressional interns received a high-profile boost earlier this week, when newly elected Rep. Alexandria Ocasio-Cortez, a Democrat from New York, announced that she plans to pay her interns at least $15 per hour.

The pledge by Ocasio-Cortez made headlines, but Creamer said several members of Congress, including Sen. Chris Murphy of Connecticut, have been working to secure funding to pay interns.

“Sen. Murphy played a big role in all of this,’’ Creamer said. “He’s a firm believer in pay for work.’’

Murphy is one of the less well-off members of the U.S. Senate; at age 45, he is still paying off student loans. Even before the funding bill was approved, Murphy offered his summer interns a modest stipend of $500, according to his office.

“Sen. Murphy believes paid internships help ensure that young people of all means and backgrounds have an opportunity to intern for their member of Congress,’’ said Laura Maloney, a spokeswoman for the Democratic senator. “For the first time ever, thanks to a new bill he helped push through Congress, Senate offices will have dedicated funding to help pay interns.”

Under the measure, each member of the U.S. House of Representatives will receive a pool of money — about $20,000 — to pay their interns. Senators have had access to funds since October that range from $43,000 to $72,000, depending on the size of their state, Creamer said.

Blumenthal hailed the measure. “This positive development will allow students the opportunity to intern who may otherwise have not been able to afford to do so,’’ he said.

Representatives are waiting for guidance from the House Administration Committee before establishing a system to pay their interns, but several members of the Connecticut delegation said they welcome the change.

“Providing this funding to pay interns is something that was long overdue and we are looking forward to doing so in the coming year,’’ said Owen Dodd, spokesman for Rep. John Larson, who has not paid his interns in the past.

A spokesman for Rep. Joe Courtney said his office was already exploring efforts to compensate its interns before the funding bill was approved.

Rep. Jim Himes also supports the effort. “Being able to pay interns will allow us to expand our base of applicants and give more students opportunities, which is something important to Congressman Himes,’’ said his spokesman, Patrick Malone.

Tess Harkin, who interned in Murphy’s office in 2017, when she was a student at American University, said she found the position enormously rewarding, even though she was not compensated and did not receive academic credit. In addition to standard intern duties such as answering phone calls and managing correspondence, she attended briefings and sat in on meetings with the senator.

“It was definitely a great experience and helped me a lot,’’ said Harkin, who graduated this year and credits the contacts she made in Murphy’s office with helping her refine her career goals. She remained in Washington and works for a group that supports Democratic candidates.

Paying interns will help equalize the playing field and allow other young people to have a similar experience, Harkin said. “We need to diversify our workforce … but with so many of these positions in politics and media and business, only people like me who admittedly come from a privileged background can accept them.”