Former Cleveland Browns defensive coordinator Jim O’Neil has agreed to take over in the same role on Chip Kelly's staff with the 49ers, a league source told CSNBayArea.com on Tuesday.

O'Neil, 37, takes over the position that Eric Mangini held on Jim Tomsula's staff last season. The 49ers ranked 29th in the NFL in yards allowed last season and 18th in the league in points allowed at 24.2 points per game.

O'Neil was selected as coordinator over 49ers outside linebackers coach Jason Tarver, whom Kelly considered the top in-house candidate. Tarver will remain as the 49ers' outside linebackers coach, the source said.

The Browns had a Top 10 defense in yards allowed and scoring under O’Neil in his first season but dropped toward the bottom of the NFL in those statistical categories last season. The Browns ranked 27th in yards allowed and 29th in points allowed.

O’Neil got his chance to take over the Browns defense after spending one season as outside linebackers coach of the Buffalo Bills in 2013. The Bills set a franchise record with 57 sacks that season.

With Kelly running an up-tempo offense, his teams during three seasons as head coach of the Philadelphia also had to defend more plays than any other team in the NFL. The Eagles faced a league-high 1,148 plays last season, second-most at 1,113 in 2014, and the most in 2013 with 1,150 defensive plays.

“I’ve also never met a defensive player that says, ‘Coach, I want you to possess the ball for the entire game so I don’t have to play,’” Kelly said last week at his introductory press conference. “I want guys that on the defensive side of the football of the San Francisco 49ers can’t wait to get on the field and embrace the opportunity to get out there and play.”

O’Neil entered the NFL coaching ranks in 2009 with the New York Jets, and served as assistant defensive backs coach for four seasons under Rex Ryan.

49ERS STAFF

Position: Coach (2015 position)

Coach: Chip Kelly (Eagles/head coach)

Offensive coordinator: Curtis Modkins (Lions/run game coordinator)

Quarterbacks: Ryan Day (Eagles/quarterbacks)

Running backs: Tom Rathman (49ers/running backs)

Wide receivers: Bob Bicknell (Eagles/wide receivers)

Tight ends: Jeff Nixon (Dolphins/running backs)

Offensive line: Pat Flaherty (N.Y. Giants/offensive line)

Defensive coordinator: Jim O'Neil (Browns/defensive coordinator)

Defensive line: Jerry Azzinaro (Eagles/defensive line)

Outside linebackers: Jason Tarver (49ers/outside linebackers)

Inside linebackers: Hardy Nickerson (Buccaneers/linebackers)

Defensive backs: Jeff Hafley (Browns/secondary)

Special teams: Derius Swinton (Bears/assistant special teams)