RICHMOND, Va. – Matt Barnes continues to pitch well for Portland with little to show for it.

Barnes, one of the top pitching prospects in the Boston system, turned in another solid performance Wednesday night against Richmond but got little support from his Portland Sea Dogs teammates in a 3-2 loss.

Barnes went 52/3 innings, allowing one earned run and four hits, walking three and striking out seven.

In his last four starts, Barnes has allowed a total of three earned runs in 202/3 innings with one win.

“Barnes was terrific,” said Portland Manager Kevin Boles. “Attacked the zone. Had a real crisp fastball.

“He’s coming along nicely. I think the big thing now is he’s controlling the effort level. When runners get on, he’s not trying to do more. He’s executing pitch to pitch and maintaining a quality focus. (Tonight) was another example of that.”

But it didn’t translate into a win, leaving his record at 5-7 but lowering his ERA to 4.38.

“It’s starting to come together for me,” said Barnes, a 2011 first-round draft pick. “I’m hitting a good patch here. I just have to keep working hard.

“I felt good out there. Had pretty good command of all my pitches. I was able to mix it up.”

The Sea Dogs committed three errors in the first inning and were fortunate to allow just one run.

A catcher’s interference call on Christian Vazquez followed an error by shortstop Heiker Meneses. Mark Minicozzi’s RBI single to right made it 1-0 but Barnes struck out the final two batters.

“We didn’t take care of the baseball in the first inning but for (Barnes) to limit the damage was a terrific job,” said Boles. “We made some mistakes on defense but we settled in, even though the conditions were a little bit rough as the game progressed.”

An intermittent rain started about midway through and turned into a steady downpour, but the umpires allowed play to be completed.

Portland tied it in the fourth. Tony Thomas led off with a single and stole second. He was sacrificed to third by Vazquez and with the infield drawn in, scored on a close play at the plate on a grounder to short by Travis Shaw.

The Sea Dogs had a chance to take the lead later in the inning, but Shannon Wilkerson flied out to the warning track in left with two on to end the threat.

With rain coming down more heavily, Portland gained a 2-1 lead in the sixth. Vazquez singled to center with one out before Shaw doubled into the left-center gap for his second RBI of the game off Richmond starter Jack Snodgrass.

Barnes was on the verge of being in line for the win before exiting after giving up a tying homer to right by Adam Duvall in the bottom of the sixth.

“It was a fastball away that he put a pretty good swing on,” said Barnes.

“With Duvall, that was pretty impressive to hit a ball out to right field,” said Boles. “That shows some strength.”

The Squirrels took the lead for good in the seventh on a triple to the wall in right-center by Javier Herrera that scored Ryan Lollis, who walked to lead off the inning against reliever Miguel Celestino (1-7).