MIAMI, Fla. -

Quarterback Matt Moore has signed a two-year contract to remain with the Miami Dolphins as a backup rather than testing free agency next week and pursuing a possible starting job.

Moore was beaten out for Miami's No. 1 job last summer by rookie Ryan Tannehill and played in only two games off the bench. The five-year veteran started 12 games for the Dolphins in 2011 and had his best season, throwing for 2,497 yards and 16 touchdowns with nine interceptions.

Financial terms of the deal weren't disclosed when it was announced Friday.

Miami also signed receiver Brian Hartline to a five-year deal Friday for nearly $31 million.

Hartline's  Agent Drew Rosenhaus says Friday the contact includes $12.5 million guaranteed. Hartline would have become an unrestricted free agent Tuesday but wanted to remain with the team that drafted him in 2009.

Hartline led Miami last year with 74 receptions for 1,083 yards, both career highs, but caught only one touchdown pass. Hartline has 183 career receptions and six scores.

Landing a top receiver for quarterback Ryan Tannehill remains the Dolphins' No. 1 offseason priority. Their wideouts combined for only three touchdown catches in 2012.