Wide receiver Percy Harvin is retiring after seven seasons in the NFL, his agent, Joel Segal, told The Associated Press.

The 27-year-old Harvin had played for three teams since the start of the 2014 season and has seen his production dip since posting career highs in catches (87) and receiving yards (967) for the Minnesota Vikings in 2011.

Harvin, who was traded from the Seattle Seahawks to the New York Jets during the 2014 season, rejoined two of his former Jets coaches -- Rex Ryan and wide receivers coach Sanjay Lal -- with the Buffalo Bills last year.

In Buffalo, Harvin showed brief flashes of the playmaking ability that made him a star early in his career. He caught a 51-yard touchdown pass in the regular-season opener and had 19 receptions for 218 yards before hip and knee injuries sidelined him in October. The Bills later placed Harvin on injured reserve.

Ryan said in December that despite Harvin's ongoing hip problems -- he missed most of the 2013 season with a similar injury -- the receiver intended to continue his playing career. Harvin signed a three-year deal in March 2015 in which the final two years automatically voided five days after Super Bowl 50 in order to reduce Harvin's 2015 salary-cap number. The contract paid Harvin almost $6 million in guaranteed money.

Harvin, who was selected with the 22nd overall pick of the 2009 draft out of Florida, has 351 career receptions for 4,020 yards and 22 touchdowns.

ESPN NFL Insider Adam Schefter and Bills reporter Mike Rodak contributed to this report.