The SNP will do "everything necessary" to keep Scotland in the EU, Angus Robertson has said.

The party's leader at Westminster made the remarks at Prime Minister's Questions on Thursday - the first of Theresa May's premiership.

Robertson mocked May's recent assurances that "Brexit means Brexit", asking her to ensure that "Remain means Remain for Scotland".

Despite the UK's vote to leave the European Union, voters in Scotland opted to remain by a margin of 62% to 38%.

In May's debut appearance as Prime Minister at the weekly session, she told Robertson that some of the ideas put forward with regards to Scotland and Brexit were "impractical".

She also took her first opportunity at the despatch box to mock Labour leader Jeremy Corbyn, using comments he made at David Cameron's final PMQs against him in describing the Labour leader as an "unscrupulous boss".

In Robertson's exchanges with the new Prime Minister, he asked: "German Vice Chancellor Sigmar Gabriel has already confirmed how Scotland is able to remain in the European Union.

"Did you discuss this when you met with First Minister Nicola Sturgeon when you were in Edinburgh, and will you do everything to ensure that Remain means Remain for Scotland?"

May responded: "I did discuss the arrangements in relation to the negotiations for the United Kingdom leaving the EU with the First Minister.

"I was very pleased that my first trip was to Scotland and that I was able to do that so early in my premiership.

"As I've been very clear, the Union is very important to me and I was also clear with the First Minister that I think there are some ideas being put forward that are impractical but I am willing to listen to the options that are bought forward and we will be engaging fully with all the devolved administrations."

The SNP's Westminster leader then jokingly extended his party's thanks to the German government for supporting Scotland's position on the EU ahead of her first visit to the country later Wednesday to meet Chancellor Angela Merkel.

He said: "Germany has the highest level of support of any European continental country for Scotland remaining in the European Union.

"Would you thank Chancellor Merkel for the interest of the members of her government and members of the Bundestag, their interest in having Scotland remaining within the EU?

"And will you assure the Chancellor and other heads of state and government that we in Scotland will do everything, everything, that is necessary for us to remain in the EU?"

May replied: "I do find it a little confusing given that only two years ago in the Scottish referendum the Scottish National Party was campaigning for Scotland to leave the UK which would have meant them leaving the European Union."

Labour leader Jeremy Corbyn quizzed May on the appointment of Boris Johnson as foreign secretary.

In a question about the treatment of black people in the criminal justice system, Corbyn asked: "Before appointing your new foreign secretary, did you discuss with him his description of black people as piccaninnies and why he questioned the motives of the US president Obama on his part-Kenyan heritage?"

Corbyn was referring to controversial comments made in the past by the former London mayor.

May replied without addressing Johnson's previous remarks: "It is correct that if you're black you will be treated more harshly in the criminal justice system.

"It's exactly why as home secretary I dealt with the issue of stop-and-search. I was concerned to make sure that nobody should be stopped and searched on the streets of this country because of the colour of their skin."

The Labour leader did not press the point and went on to ask about austerity and job insecurity.

May then joked at Corbyn's expense: "You refer to the situation of some workers who might have some job insecurity and potentially unscrupulous bosses.

"I suspect there are many members on the opposition benches who might be familiar with an unscrupulous boss; a boss who doesn't listen to his workers; a boss who requires some of his workers to double their workload; and maybe even a boss who exploits the rules to further his own career.

"Remind him of anybody?"