HARTFORD, Conn. — Railroad cars equipped with bars for serving alcohol are returning to commuter trains running between New York City and Connecticut, restoring a tradition dating back 50 years that evoked the stylish cocktail-sipping scenes of the “Mad Men” TV show.

State officials plan to buy an additional 60 cars for Metro-North’s New Haven Line and convert 10 of them into “cafe cars,” Democratic Gov. Dannel P. Malloy announced Tuesday. A prototype bar car is expected to be online by late 2018, with the others arriving beginning in late 2020.

Bar cars were retired in 2014 because they could not be coupled to a new fleet of train cars. At the time, they were believed to be the last of their kind in the country, although Amtrak still serves liquor in some of its cars.

Commuters were able to enjoy beer or cocktails in clear plastic cups amid faux-wood paneling and red leather lounges, giving it the feel of “Mad Men,” a show about advertising firms set in 1960s New York. The rolling taverns were where workers gathered for decades for dice games, job networking and Christmas parties with jazz bands.

Bar car enthusiasts were excited by Tuesday’s announcement, although they wished the cars would return sooner than 2018.

“I can’t tell you how many people I know who are happy they are coming back online,” said Terri Cronin, a commuter and a vice president of the rider advocacy group Connecticut Commuter Rail Council. “We think they’re an asset for the Metro-North New Haven Line and certainly part of the history of the New Haven Line, and we’re happy they’re bringing back something that was enjoyed for many generations.”

The new bar cars will have a modern feel, with gray counters on the bar serving areas and along the windows, according to a rendering released by Malloy’s office.

“If we want to remain competitive in the 21st century, modernized economy in a way that attracts new businesses and creates high-skilled jobs, we must update our infrastructure and give our commuters a best-in-class transportation system,” Malloy said.

The New Haven Line remains the country’s busiest commuter rail line, he said. The service carried more than 40 million passengers last year.

The bar car announcement comes as Connecticut officials are proposing a 5 percent increase in train fares on the New Haven Line that would go into effect on Dec. 1. State officials are planning to pay for the new M-8 rail cars with $200 million in state borrowing.