 Their opposition forced him to rely on an ever smaller circle of loyalists; in 1686, Moray was appointed Lord High Commissioner to the Parliament of Scotland, charged with ensuring repeal of the 1681 Test Act.Moray had converted to Catholicism in 1686; although this was not made this public until 1687, many suspected it and challenged his right to hold office at all.Despite threats and the removal from office of opponents, the Scottish Parliament refused to pass these measures, forcing James to use the Royal Prerogative.