NEW DELHI — A brand-new, six-lane expressway that halves the travel time between New Delhi and Agra, home to the Taj Mahal, was a scene of revelry and pride Friday as hundreds of families made the most of a public holiday to test the ride and take photographs.

“What a lovely smooth cruise we are having today. It’s a great escape from driving daily on clogged, congested roads,” said Sameer Singh, a 44-year old businessman who took his family on the wide-open highway less than 24 hours after it opened to see Agra’s famed 17th-century marble monument. “I could not wait to test the claim that it would just take two hours to Agra.”

By afternoon, about 400 cars had made the drive, an expressway official said.

Although the Yamana Expressway provided a smooth commute Friday, the project had experienced many bumps and detours, taking nine years to complete after winning government approval.

In many ways, the expressway is a microcosm of the larger tussle in India between the slow, politics-hampered pace of infrastructure development and the growing middle class’s aspirations to a world-class lifestyle.

Not too long ago, it was the site of bitter and prolonged protests — and the object of intense political wrangling — as farmers sought higher compensation for the government’s forced acquisition of their farmland.

On Thursday, the road was officially opened amid protests by hundreds of farmers demanding the promised payment. They also said that the toll should be waived for those who sold their land to make room for the highway and asked for more underpasses for villagers’ use.

“We have already announced that henceforth, farmers’ land will be acquired only after getting their consent,” said Akhilesh Yadav, the chief minister of Uttar Pradesh, when he inaugurated the road.

Commuters on Friday noted that unlike other highways in India, the Yamuna Expressway has barbed-wire fencing and guard rails along the side to keep local villagers and stray cattle from crossing casually.

They got a glimpse of the old and new India from their car windows — village huts, farmland and the new Formula One racetrack. Villagers sat on the rails and watched the speeding cars in wonder.

Huge signs warned drivers against drinking or using cellphones while driving and overtaking from the wrong side, pointing out that surveillance cameras would catch wrongdoers. Television commercials urged commuters to avoid littering.

Despite the dream run on the new expressway, reality made a rude reappearance for Sameer Singh as soon as he reached the end.

“The minute you get off the expressway, you are again in the middle of potholed roads, traffic jams and chaos in Agra city,” Singh said. “I wish we could have driven on the expressway straight to the Taj Mahal entrance. The stark contrast hits you badly.”