MINNEAPOLIS — There Asdrúbal Cabrera was again, digging his feet through the rain-slicked dirt at Target Field, daring his manager to sit him and see who can match what he’s doing at the plate.

He was, in action, legging out his first triple of the season. He was, in a word, producing. It has become a habit of Cabrera’s since he joined the Washington Nationals on a tryout of a contract in early August. And on Thursday night, in a 12-6 win over the Minnesota Twins, he helped the offense build a lead to withstand a near collapse from the bullpen.

The 33-year-old knocked an RBI single in the third. He added that RBI triple in the fifth, with two outs and a rally sagging, then scored two pitches later on a passed ball. He started at second base, moved to first when Matt Adams exited in the fourth with a tweaked left shoulder, and continued to prove he should be a fixture of Manager Dave Martinez’s lineup moving forward.

“He’s going to play a lot,” Martinez said, stopping short of calling Cabrera his everyday second baseman. “But he’s another guy that we have to make sure we take care of his legs. I want to keep him fresh.”

Cabrera has appeared in 24 contests for the Nationals since he was designated for assignment by the Texas Rangers. He has 29 RBI in that span, and the most recent two came in the team’s outburst against the Twins. Anthony Rendon, Adam Eaton, Juan Soto and Yan Gomes crushed home runs. Rendon finished with two hits and three RBI. Starter Patrick Corbin gutted out six innings, especially after sitting through a 50-minute rain delay, and that all helped Washington stay 3½ games ahead of the Chicago Cubs and Milwaukee Brewers for the National League’s top wild-card spot.

Those standings are now crammed with teams heading into the weekend. The Nationals have a decent lead with 17 games left, but the Brewers, Cubs and New York Mets have applied pressure. The Philadelphia Phillies and Arizona Diamondbacks are hanging around, too. By winning this series in Minneapolis against the first-place Twins, Washington can take some rhythm into upcoming matchups with the Atlanta Braves and St. Louis Cardinals. Those clubs are tearing through September. That only added importance to leaving here on top.

Rendon gave the Nationals an early lead with a solo shot in the first. But the slight advantage was erased when Corbin yielded an RBI single to Eddie Rosario in the bottom half. Any ball that touched the field became slick. Corbin often paused between pitches to rub the leather dry. The conditions weren’t ideal for anyone involved but were even tougher for the guys trying to throw right into their catchers’ mitts. Twins starter Kyle Gibson slipped in the third, giving up two runs, but Nelson Cruz soon trimmed the Nats’ lead by taking Corbin deep with a towering homer to center.

Then Cabrera helped stretch the deficit to one the Twins couldn’t overcome.

“I feel really good,” Cabrera said when asked how he feels physically. “I’ve been feeling really good at the plate. I’m just enjoying the opportunity to be on the field.”

His triple punctuated a three-run fifth and gave Corbin — and later the bullpen — some breathing room. Even more came an inning later when Rendon cracked a two-run double and Soto added a two-run home run. The Nationals needed it all once Aaron Barrett gave up three runs in the eighth, the inning that has given them so much trouble all season. But Fernando Rodney relieved Barrett and stranded the bases loaded with back-to-back strikeouts, and Javy Guerra finished off the Twins in the ninth.

Cabrera had left the Rangers with 12 home runs and a sagging .235 batting average. He then quickly joined the Nationals as a depth infielder for the stretch run. When he did, during a series in San Francisco about a month back, Martinez laid out a limited role. He would use Cabrera to spell Brian Dozier at second every so often. He would have him learn first base, right away, because of lingering injures for Ryan Zimmerman and Adams. And beyond that, the switch-hitting Cabrera could maybe provide some pop off the bench.

But he has sprinted past those expectations in the weeks since. Thursday was his 20th start for Washington — 18 at second, two at first — and Dozier’s opportunities have waned. Dozier was signed to a one-year deal in December to be the everyday second baseman. He has struggled for most of the season, only breaking out with short bursts of power, and Cabrera is a logical option against right-handed pitchers. Howie Kendrick, who also plays first and second, crushes lefties and is having a standout season. That doesn’t leave many extra at-bats.

Still, Martinez has a daily puzzle on the right side of the infield. He has Zimmerman, Adams, Kendrick and Cabrera to cycle through first and Dozier, Cabrera and Kendrick to fit in a second. It’s just becoming clear, with each passing game, that the Nationals are better off with Cabrera on the field. Every run he accounts for — the 29 he has driven in, the 15 he has scored — only builds that case.

“I’m just battling every at-bat, every pitch,” Cabrera said. “It’s always different when you play for a team that has a big chance to make it to the playoffs.”