SAN FRANCISCO — This was the Steven Matz who had helped carry the Mets rotation over the first two months of the season.

That version of Matz had largely disappeared for six weeks — which included a stint pitching from the bullpen — but Sunday he re-emerged to limit the Giants to two runs over six innings. He received a no-decision in the Mets’ 3-2 loss in 12 innings at Oracle Park.

“It’s been a long stretch since I’ve had decent results,” Matz said. “So it’s definitely a step in the right direction.”

Matz entered 2-6 with a 6.85 ERA on the road this season, but neutralized the Giants by escaping two jams. In the second inning, he stranded two runners on base after Brandon Crawford had stroked an RBI single. And in the fourth, after Zach Green had delivered an RBI double, Matz got two outs to keep the go-ahead run stranded at second base.

“Matzy threw the ball great,” manager Mickey Callaway said. “He was under control, he didn’t let anything bother him and it seems that he’s turned the corner.”

In his return to the rotation last week in Minnesota, the left-hander was on a pitch count and got removed after four innings in which he threw 68 pitches. He allowed two runs over four innings in the no-decision.

Matz was sitting with a 3.55 ERA after beating the Dodgers on May 28, but then slogged to the All-Star break, finishing the first half with a 4.89 ERA. Matz said the increased usage of his slider has been a factor in his better performances lately.

“It’s just been effective for me,” Matz said. “I talked with Wilson [Ramos] and that combo, fastballs in, cutters in, sliders in, it’s just been effective for me, so just sticking with it.”

The Mets have received inquiries about Matz with the July 31 trade deadline approaching, according to industry sources, but the Mets are unlikely to deal him given the two years of club control he has remaining after this season. Zack Wheeler and Jason Vargas are the most probable Mets pitchers to be traded, with Noah Syndergaard also a possibility, but less likely to be dealt than Wheeler and Vargas.