Jacob Trouba and the Rangers will be together for a long time.

The team announced it had agreed to terms with the recently acquired blueliner on Friday. The Post’s Brett Cyrgalis confirmed the contract is a seven-year deal worth $56 million.

Trouba, acquired mid-June for a first-round pick and defenseman Neal Pionk, was a restricted free agent with the teams scheduled to go to arbitration this month. Instead, the Rangers locked up the 25-year-old righty, a former first-round pick in 2012.

A big-bodied defenseman, Trouba established career highs with 42 assists and 50 points in 2018-19, his sixth NHL season, all with Winnipeg.