MADRID (Reuters) - Spain’s Socialists would easily win a general election if a vote were held, taking 29.9 percent of the vote, according to an opinion poll released on Thursday, the first since they took power in June.

FILE PHOTO: Spain's Socialist (PSOE) leader Pedro Sanchez addresses Parliament during the final day of a motion of no confidence debate in Madrid, Spain, June 1, 2018. Emilio Naranjo/Pool via REUTERS

The PSOE Socialists ousted 6-year Prime Minister Mariano Rajoy and his conservative People’s Party following a no-confidence vote after dozens of officials were charged in a high profile corruption case.

Pedro Sanchez became prime minister with only 84 seats for his PSOE Party in the 350-member assembly thanks to support from the hard-left Podemos and smaller regional parties.

Sanchez has announced high-profile measures to cement his power and attract left-wing voters. These include appointing a cabinet with a majority of women to taking in the migrant ship Aquarius and proposing raising state pensions in line with inflation.

According to the poll by the Sociological Research Centre, and held between July 1 and July 10, the People’s Party fell to joint second place with the market-friendly Ciudadanos party, both polling 20.4 percent of the vote.

The poll did not take into account a swing by the People’s Party to the right after Pablo Casado became party leader.

Casado won a clear victory in a ballot of People’s Party members at the end of July with a call for party unity, a stronger Spain at the heart of Europe and tougher laws to stave off any moves toward independence by its regions.

Anti-austerity party Podemos dropped to 15.6 percent of the vote, the poll showed.

Those results compared with a previous poll published in May which showed the PP taking 24 percent, Ciudadanos 22.4 percent, Socialists 22 percent and Podemos 19.6 percent.

Almost 2,500 people were interviewed for the poll.