Ryan Anderson is competing with rookie first-round pick Montez Sweat for the starting job replacing Preston Smith at outside linebacker. (John McDonnell/The Washington Post)

RICHMOND — Ryan Anderson had a moment of clarity in the spring. He was now the favorite to be a starting outside linebacker for the Washington Redskins after a pair of lackluster seasons that were marred by injury. The status quo of his first two seasons wouldn’t be enough moving forward.

“I feel like I’m a lot more mature and taking care of my business,” Anderson said. “I’m not a guy that doesn’t realize what’s going on. I realize what’s going on. I realized I hadn’t been where I needed to be. My weight and my body, I realized I wasn’t taking it serious. Now, I’m [going to] do everything I’ve got to do, and we’ll see when I start playing. We’ll get the results."

The adjustments began off the field. No more fried food. Fewer carbs. No more late-night meals. Hydrating better.

Anderson also started taking body maintenance more seriously. He picked up nuances from teammate Ryan Kerrigan’s routine, started stretching better before and after workouts. The goal is to play at about 245 pounds, and the former Alabama standout said he can feel the difference already. There haven’t been any training camp cramps, and Anderson said he feels he’s moving better and getting through practice with more energy.

Kerrigan said he has noticed Anderson playing lower and more confidently, and that the new focus on his body has translated to production on the field.

“When I got to this level, I thought maybe I could stay up late, eat bad and [just] come in,” Anderson said. “It just don’t work that way. . . . A lot of stuff I’ve got to do on my own.”

His study habits also changed, and he said knowing more of the defense has allowed him to play faster. But that also required a change in mentality: Anderson said he has loosened up, even from the start of training camp, and that has allowed him to stop looking over his shoulder and just play.

If there’s a time to get serious, it’s now. The starting job is his to lose, and the team spent a first-round draft pick to bring in Montez Sweat at the same position. Anderson has the leg up as a veteran, but teams don’t spend first-round picks to keep a guy on the bench. It’s up to Anderson to prove he’s more than the player who totaled 32 tackles and two sacks in his first two seasons — because even if Sweat ultimately claims the starting role, both players are likely to see playing time.

“I think he’s gotten himself into better shape this year,” Coach Jay Gruden said of Anderson. “Which is, for his style of play — physical, hustling, tough mentality — you’ve got to be in great shape. I think he’s put himself in a position … in the weight room and [with] the training staff, where his motor should be able to run hot for a longer period of time.”

More Redskins coverage:

There’s a reason Redskins’ Josh Doctson won’t talk about his heel pain

Landon Collins has a highlight interception, and other Redskins camp takeaways

Jay Gruden ‘seriously’ doubts Redskins will trade Trent Williams