He was further promoted to be rear admiral of the red on 16 February 1722, but does not appear to have been actively employed until 1726, when he took a small squadron to Gibraltar, where he joined up with another squadron under Sir John Jennings to deter possible Spanish aggression. When Jennings sailed home, Hopson took over command in the Mediterranean, and was promoted to become vice admiral of the blue on 19 April 1727. With relations with Spain descending into a war, Gibraltar was reinforced by six ships under Sir Charles Wager, who took command of the post. Hopson served under him in the ensuing siege of Gibraltar.