Before Matt Riley pitches at Fenway Park on Sunday in one of the two minor league all-star games he was selected to play in, he had one more start for the Bowie Baysox last night.

Riley cruised through seven innings, allowing two earned runs, six hits and one walk while striking out six in helping the Baysox beat Erie, 6-3, before 9,804 at Prince George's Stadium in a Class AA Eastern League game.

The first three innings were relatively shaky, but thereafter Riley went through one stretch of 13 batters without allowing a hit. Brian Cooper took the loss, allowing five runs on 12 hits.

Riley spent time on the disabled list last week because team officials said they suspected he had a viral infection.

"The first three innings were a little rough," Riley said. "I tried to find my rhythm. By about the fourth, I got back into a good rhythm."

Riley is participating in the Major League Baseball all-star activities, in the Futures game made up of minor league prospects. He also was selected for the Class AA all-star game, in which he will not pitch.

Yesterday, the roster for the Pan Am Games team was trimmed from 34 to 24 players, and Riley was still on it, though he said he wasn't sure if he would play.

The Baysox' key inning was the fourth, when they scored three runs to take a 4-3 lead. Cesar Devarez drove in two runs with a single and Tom Hage had an RBI single.

Bowie later added a run on a wild pitch in the seventh and another run on Augie Ojeda's single.