Ryan Mattheus. (Alex Brandon/Associated Press)

Ryan Mattheus, a former Nationals reliever who was a key part of the bullpen in 2012 but was let go this offseason after struggling, has agreed to a minor league deal with an invitation to big league camp with the Los Angeles Angels, according to a person familiar with the situation. The Nationals were interested in Mattheus, but he has a chance to compete for a spot in the Angels’ bullpen.

Mattheus, 31 and a California native, started off last season with a rib-cage injury during spring training. He spent most of the year at Class AAA Syracuse, posted a 5.80 ERA in 40 1/3 innings, suffered another core injury and logged only 8 2/3 innings in the majors this season. The Nationals parted ways with Mattheus during November’s roster crunch, outrighting him, and he elected free agency.

During the 2013 season, Mattheus struggled, posted a 6.37 ERA in 35 1/3 innings and broke his right hand in late May after punching a locker following a rough outing. Despite his recent difficulties, Mattheus was an integral reliever during the division-winning 2012 campaign. He posted a 2.85 ERA in 66 1/3 innings, relying on his hard fastball, slider and split-finger. Mattheus may be best remembered for his affable personality, his Katy Perry “Firework” entrance song and the three outs he notched on two pitches with the bases loaded in the Nationals’ win in Game 1 of the 2012 NLDS.

The Nationals acquired Mattheus in 2009, two weeks after he had Tommy John surgery, and minor leaguer Robinson Fabian from the Rockies for reliever Joe Beimel.