Their next voyage took them to the Mediterranean along the coast of Spain, including Águilas and Cabo de Gata, where they picked up cargo to be taken to London and unloaded. Their stay in Spain lasted several weeks and impressed the young sailor, the accounts of which Cooper later referred to in his "Mercedes of Castile", a novel about Columbus. After serving aboard the "Sterling" for 11 months, Cooper joined the United States Navy on January 1, 1808, when he received his commission as a midshipman. Cooper had conducted himself well as a sailor, and his father, a former U.S. Congressman, easily secured a commission for him through his long-standing connections with politicians and naval officials. The warrant for Cooper's commission as midshipman was signed by President Jefferson and mailed by Naval Secretary Robert Smith, reaching Cooper on February 19. On February 24, he received orders to report to the naval commander at New York City. Joining the United States Navy fulfilled an aspiration Cooper had had since his youth. Cooper's first naval assignment came in March 21, 1808 aboard the , an 82-foot bomb ketch that carried twelve guns and a thirteen-inch mortar. For his next assignment, Cooper served under Lieutenant Melancthon Taylor Woolsey near Oswego on Lake Ontario, overseeing the building of the brig for service on the lake. The vessel was intended for use in a war with Great Britain which had yet to begin. The vessel was completed, armed with sixteen guns, and launched in Lake Ontario in the spring of 1809. It was in this service that Cooper learned shipbuilding, shipyard duties, and frontier life. During his leisure time, Cooper would venture through the forests of New York state and explore the shores of Lake Ontario. He occasionally ventured into the Thousand Islands. His experiences in the Oswego area later inspired some of his work, including his novel "The Pathfinder". After completion of the "Oneida" in 1809, Cooper accompanied Woolsey to Niagara Falls, who then was ordered to Lake Champlain to serve aboard a gunboat until the winter months when the lake froze over. Cooper himself returned from Oswego to Cooperstown and then New York. On November 13 of the same year, he was assigned to the under the command of Captain James Lawrence, who was from Burlington and became a personal friend of Cooper's. Aboard this ship, Cooper met his lifelong friend William Branford Shubrick, who was also a midshipman at the time.