The leader of Venezuela's opposition has claimed it has won a critical two-thirds majority in Sunday's election.
Henrique Capriles said the alliance won at least 112 seats in Congress.
If confirmed, this would allow the opposition to make sweeping changes to legislation and appointments made under the current Socialist government.
President Nicolas Maduro earlier admitted defeat - the worst for the movement founded by late leader Hugo Chavez in 1999.
The National Electoral Council has announced that the opposition won 110 seats in the 167-member assembly.
The Socialists have gained 55 seats and two more seats remain to be declared.
Among the campaign issues were chronic food shortages of staples - such as milk, rice, coffee, sugar, corn flour and cooking oil.
Venezuela has been hit hard by the continuing low price of oil, its main export. It also has the continent's highest inflation rate.
Mr Maduro has blamed the situation on an "economic war" waged by the opposition.
"We have come with our morals and our ethics [intact] to recognize these adverse results, to accept them and to say to our Venezuela that the constitution and democracy have triumphed.
"We have lost a battle today, but the struggle to build a new society is just beginning." - Nicolas Maduro, Venezuela's president and head of the United Socialist Party of Venezuela.
"The results are as we hoped. Venezuela has won. It's irreversible," tweeted (in Spanish) Henrique Capriles, a leading opposition figure in the Democratic Unity Roundtable and a former presidential challenger.
"Venezuela wanted a change and that change came. A new majority expressed itself and sent a clear and resounding message." - Jesus Torrealba - opposition coalition chief.
What happens now?
If Mr Capriles' claim is confirmed, senior opposition figures say the alliance would be able to pass laws allowing the release of political prisoners and to reverse, for example, appointments to senior legal positions made by the current government, says the BBC's Wyre Davies in Caracas.
It also gives stronger momentum to the opposition should it wish to call a referendum on Mr Maduro's future. This could take place only when his presidency reaches its halfway point in April next year.
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 next presidential election is due in April 2019.
Why does the result matter?
- It is the first time in 16 years that the PSUV is not in control in Congress - a serious blow to its socialist revolution
- At 74.3%, voter participation was high, suggesting a sizeable proportion of the population backed change
- The opposition will pose a serious challenge to the government's power to pass legislation
- Jailed opposition leaders could be released if the opposition makes good on its promise to pass an amnesty law
- It is another blow to left-wing policies in Latin America, coming two weeks after a centre-right candidate won in Argentina's presidential poll
How the campaigns were run
The elections were widely seen as a referendum on President Maduro, the handpicked successor of 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".
The opposition also accused the government of increasing authoritarianism.
Earlier this year, opposition leader Leopoldo Lopez was given a 13-year prison sentence for inciting violence - a charge critics say was politically motivated.
Did you vote in the election? What is your reaction to the result? Let us know about your experiences. Email email@example.com with your stories.
Please include a contact number if you are willing to speak to a BBC journalist. You can also contact us in the following ways: