Question: Maine State Route 161 runs from Fort Fairfield to a town located on which river ?

Context paragraphs:
Maine State Route 161: State Route 161 (SR 161) is part of Maine's system of numbered state highways.  It runs 86 mi from Fort Fairfield to Allagash.  It begins at the Fort Fairfield - Andover Border Crossing along the Canada–US border to Dickey Road near the confluence of the Allagash and Saint John rivers.

Ohio State Route 161: State Route 161 (SR 161) is an east–west state highway in central Ohio.  Its western terminus is in Mutual at State Route 29 and its eastern terminus is near Alexandria at State Route 37.  It is 57.46 mi long.  State Route 161 passes through Columbus, Ohio's capital, and a variety of towns including Plain City, Dublin, and New Albany.

Quebec Route 161: Route 161 is a north/south highway south of the St. Lawrence River in Quebec, Canada.  Its current northern terminus is east of the junction of Autoroute 55 in Saint-Wenceslas, and its southern terminus is at the border of Maine in the USA, where it continues as Maine State Route 27.

California State Route 161: State Route 161 (SR 161) is a California state highway running along the California-Oregon state line from U.S. Route 97 north of Dorris to the intersection of Route 139 and Oregon Route 39 north of Tulelake.  Route 161 is part of the Volcanic Legacy Scenic Byway.

Ohio State Route 29: State Route 29 (SR 29) is an east–west state highway in the west-central portion of the U.S. state of Ohio.  Its western terminus is at the Indiana state line near Celina, where State Road 67 continues west.  It continues east to St. Marys where it junctions with U.S. Route 33.  In that town, it also crosses State Route 66, State Route 116, and State Route 703, which was its former alignment before a divided highway was built.  After turning south it crosses State Route 219 in New Knoxville and then has an interchange with Interstate 75, continuing into Sidney where it meets State Route 47.  Still going southeast, it briefly joins State Route 235 before turning east and then south again to enter Urbana.  Here the route joins U.S. Route 36, and the concurrency intersects with U.S. Route 68 and State Route 54.  From there, State Route 29 leaves U.S. Route 36 and continues to Mutual, intersecting with State Route 161, and State Route 56 shortly after; later, in Mechanicsburg, the route intersects with State Route 4.  The route then intersects with State Route 38, U.S. Route 42, and Interstate 70 before reaching its eastern terminus at U.S. Route 40 on the western edge of West Jefferson.

Allagash, Maine: Allagash is a town in Aroostook County, Maine.  it is on the Allagash River in the North Maine Woods region.

Fort Fairfield Public Library: The Fort Fairfield Public Library, located at 339 Main Street, is the public library of Fort Fairfield, Maine, USA.  Fort Fairfield had a private library as early as 1880.  It became a town-supported library in 1894 with a circulation of 300 books.  In 1911 the town received a grant of $10,000 from Andrew Carnegie - making it one of the seventeen Carnegie libraries in the state of Maine.  The building was designed by Lewiston architect Harry Coombs, and built by R.J. Noyes of Augusta.  The Fort Fairfield Public Library was completed and officially opened on September 9, 1913.

New York State Route 161: New York State Route 161 (NY 161) is an east–west state highway located in eastern Montgomery County, New York, in the United States.  It extends for just over 7 mi from an intersection with NY 30A in the town of Glen to a junction with NY 30 in the town of Florida.  The route is a two-lane highway known as Mill Point Road, named for a small hamlet situated near NY 161's midpoint.  At Mill Point, the road crosses Schoharie Creek.  NY 161 was assigned as part of the 1930 renumbering of state highways in New York and has not been altered since.

Fort Fairfield - Andover Border Crossing: The Fort Fairfield - Andover Border Crossing is an international border crossing between the towns of Fort Fairfield, Maine, United States, and Perth-Andover, New Brunswick, Canada on the Canada–US border, joining Maine State Route 161 (Boundary Line Road) and New Brunswick Route 190 (Fort Road).  The United States border station was built in 1933, and was listed on the National Register of Historic Places in 2014.  The Canada border station was built in 2007, replacing the previous facility that was built in 1954.  This crossing was a historical flashpoint during the bloodless Aroostook War of the 1830s, in which the US and Great Britain disputed the border's location.  That dispute was ended with the Webster-Ashburton Treaty in 1842.

New Brunswick Route 161: Route 161 is a New Brunswick highway that runs for 5.0 kilometers from a junction with Route 120 at Caron Brook, to the International Bridge at Clair; in Madawaska County.  The route connects to U.S. Route 1 and Maine State Route 161 across the Saint John River in Fort Kent, Maine.

Supporting paragraphs: Maine State Route 161 Allagash, Maine
Answer: Allagash River