Spain's prime minister Mariano Rajoy believes if the UK leaves the EU, Scotland will leave as well.

Rajoy said Nicola Sturgeon had no legal competence to negotiate Scotland's entry into the EU, Reuters reported.

The French President Francois Hollande echoed the statement, saying any negotiations must be with the UK Government.

Mr Rajoy's comments come after First Minister arrived for talks in Brussels with European Union leaders on Wednesday.

At a news conference in Brussels, he said: "I want to be very clear ... Scotland does not have the competence to negotiate with the European Union.

"Spain opposes any negotiation by anyone other than the government of United Kingdom."

He added: "I am extremely against it, the treaties are extremely against it and I believe everyone is extremely against it.

"If the United Kingdom leaves ... Scotland leaves."

Mr Hollande agreed, saying: "The negotiations will be conducted with the United Kingdom, not with a part of the United Kingdom."

Rajoy is the country's acting Prime Minister, after his conservative People's Party fell short of a majority in elections at the weekend.

He is trying to form a coalition government but may lead a minority administration if talks fail.

Sturgeon said the aim of her trip is to "protect Scotland's relationship with the European Union".

The SNP leader has held discussions with the president of the European Parliament Martin Schulz and held further meeting with EU Commission president Jean-Claude Juncker on Wednesday afternoon.

Speaking to reporters on Wednesday, the First Minister said: "Since I have been here today I have found enormous interest in the referendum result and I have also found a sympathetic response."

She continued: "We are in uncharted territory right now and none of this is easy."