The deputy first minister's office is to be investigated over allegations it wrongly withheld information from a journalist.

The Scottish Information Commissioner (SIC) Daren Fitzhenry confirmed he will probe claims that John Swinney's office had documents removed from a freedom of information (FOI) response.

Internal government emails show an official asking for the documents to withheld based on Swinney's preference while civil servants were crafting an FOI response to journalist and lecturer James McEnaney.

The documents detail correspondence between Scottish ministers and Prince Charles, and education charity Teach First of which the Prince of Wales is a patron.

In a letter responding to Scottish Liberal Democrat MSP Tavish Scott, the SIC said the case would form part of a wider review into the Scottish Government's handling of FOI requests.

The Scottish Government refuted the premise that there is a specific SIC investigation into the deputy first minister or his office.

The commissioner's probe into the government's conduct will explore whether information requests from journalists are treated differently to those from other people.

Scotland's FOI watchdog is to also examine the role of special advisers, or SPADs, in the request-handling process and probe if politically-sensitive requests are handled under different procedures to others.

The government email chain obtained by Mr McEnaney appears to the show the deputy first minister's SPAD Colin McAllister screening an FOI request.

In one email, an official asks McAllister to look at changes to an FOI response and decide if they "addressed the points you've made".

Another message from an official indicates the deputy first minister's preference that certain documents be removed from a draft FOI response.

It reads: "DFM is content for this to go but thinks it would be better to see if we could not release the material relating to Prince Charles or his PS [redacted].

"He specifically referenced documents 20, 24, 25, 26 as ones he'd prefer were not released."

Mr McEnaney later revealed that three of these four documents were indeed withheld in the FOI response he received from the Scottish Government.

He appealed the decision to block these documents, eventually obtaining all of them, which Mr McEnaney said showed "the basis for withholding them was, at best, extremely shaky".

Challenged on the issue at First Minister's Questions last week, Nicola Sturgeon said oversight of FOI requests by ministers and the involvement of SPADs was "very routine" and had been the case "right back to before we were in office".

The Scottish Government currently has 14 special advisers, the joint-highest total since devolution.

Parliamentary business minister Joe FitzPatrick told MSPs last summer that SPADs only assess freedom of information responses for accuracy.

Scott said the official documents "reluctantly released" to Mr McEnaney showed that was wrong.

The Lib Dem MSP said: "The information commissioner is quite right to investigate these serious allegations.

"The documents reluctantly released by the Scottish Government suggested that special advisers were interfering in the content of replies to freedom of information requests in the very same week that ministers told me and parliament they weren't.

"What ministers would 'prefer' isn't relevant when it comes to freedom of information. It is a matter of the law and the public's right to information which is clearly defined in legislation.

"We need to see a thorough investigation of the Scottish Government's approach to information governance."

In his response to Scott, the SIC said: "It will not surprise you that the cases referred to in your letter will be included in the list of cases to be examined, and will receive my attention."

A Scottish Government spokeswoman said: "There is no investigation into the deputy first minister or his office and the commissioner's letter does not support Mr Scott's claim.

"The information commissioner's response to Mr Scott confirms that the case in question is one being considered as part of his general assessment of the Scottish Government's approach to Freedom of Information.

"This action was set out publicly in a letter last week by the information commissioner."

A full copy of the SIC's response to the Lib Dem MSP can be read at the link below.

The involvement of politically-appointed SPADs in the handling of FOI requests from journalists has caused friction in the past.

Last year, 23 journalists, including trade union representatives from STV News and the BBC, signed an open letter raising a number of complaints about the handling of information requests from members of the media.

Correction: An earlier version of this article wrongly asserted that Colin McAllister had sent an email requesting documents be removed at John Swinney's preference. In fact, this email was sent by an unnamed official who was working as a private secretary in the deputy first minister's office.