The Socialists have gained 46 seats, with another 22 yet to be declared.
President Maduro has admitted defeat, saying his party recognised "these adverse results".
The opposition alliance, made up of centre and conservative parties, is confident of ultimately taking at least 112 seats after 17 years of socialist rule.
According to senior figures in the movement, that would allow them to pass laws allowing the release of political prisoners and to reverse, for example, appointments to senior legal positions made by the current government, the BBC`s Wyre Davies reports from Caracas.
"The results are as we hoped. Venezuela has won. It`s irreversible," tweeted Henrique Capriles, a leading opposition figure in the Democratic Unity Roundtable and a former presidential challenger.
However, under Venezuela`s presidential system the United Socialist Party of Venezuela (PSUV) will still be a powerful force, as it controls many municipalities.
The elections were widely seen as a referendum on President Maduro, the handpicked successor of the late President Hugo Chavez, and the party`s socialist policies.
The opposition accused the PSUV of mismanaging the economy and of squandering the country`s oil wealth.
Mr Maduro says his party defends the interests of ordinary Venezuelans and wants to complete Mr Chavez`s "Bolivarian Revolution".
More about: