The Eastern Route main line between Boston and Portsmouth, New Hampshire opened in 1836 as the Eastern Railroad. Ferries were used to transport passengers between the East Boston terminal and Boston proper. The line was extended to Portland, Maine, in 1842 under a track-sharing agreement with the Boston and Maine Railroad. The Gloucester Branch was constructed in 1847, but despite local support, it was not extended to Rockport until November 1861. In 1854, with the opening of the Grand Junction Railroad, the Eastern Railroad acquired direct access to downtown Boston. This access was more convenient than its previous access, which required using the Saugus Branch or the South Reading Branch Railroad.