George I promised that the double marriage alliance would be formally agreed upon in connection with the Treaty of Hanover (1725). Sophia Dorothea accompanied Frederick William to meet George in Hanover to discuss the matter, and was left there to handle the negotiations when he returned to Berlin. However, she failed to accomplish anything, as the matter was avoided by both George I and his ministers. When she returned to Berlin, Frederick William was so discontent with her failure that he had the passage between their apartments walled up (it remained so for six weeks). Frederick, Prince of Wales, sent his agent La Motte to ask whether she would permit a secret visit by him to see his intended bride, Wilhelmine. The queen agreed, but made the mistake of saying so to the British ambassador Dubourguai, which obliged him to inform George I. George recalled Frederick to England, and had La Motte arrested and imprisoned. All this damaged the queen and the prospect of the marriage alliance in the eyes of the king, causing a great row between them.