The Baltimore Ravens are adding a much-needed weapon to their receiving corps.

Wide receiver Jeremy Maclin agreed to a two-year contract with the Ravens, the team announced Monday.

Maclin, 29, was released by the Kansas City Chiefs on June 2 after two years with the team. He had a career-low 44 catches for 536 yards and two touchdowns while playing 12 games in an injury-filled 2016 season.

In Baltimore, he joins an offense looking for an additional receiving threat following the retirement of wide receiver Steve Smith Sr. and the release of tight end Dennis Pitta, who re-injured his hip during organized team activities. Wide receiver Mike Wallace was the only returning player who had more than 35 catches last season.

Maclin also rejoins offensive coordinator Marty Mornhinweg, who held the same position with the Philadelphia Eagles when Maclin was with the team for his first four seasons (2009-12) in the NFL.

Maclin also visited the Buffalo Bills while considering his options.