WASHINGTON -- It ended up being a long day for the Nationals as the Giants swept a doubleheader at Nationals Park on Thursday.

Giants right-hander Matt Cain proved to be too much for the Nationals, who ended up losing the second game of the doubleheader, 4-1, in a rain-shortened affair.

In the first game, Washington lost to San Francisco, 5-1, and saw Randy Johnson win his 300th career game. The Nationals have now lost eight out of their last nine games and dropped their record to 14-38.

Nationals left-hander Ross Detwiler pitched in the second game and had his worst outing of the season. He lasted 5 2/3 innings and gave up four runs on 10 hits.

Detwiler was given a 1-0 lead in the first inning, when Ryan Zimmerman hit a sacrifice fly to drive in Cristian Guzman. But it was all Giants after that. In the fourth inning, San Francisco tied the score as Eli Whiteside singled to right field to drive in Andres Torres.

The next inning turned out to be Detwiler's worst. San Francisco scored three runs, thanks to RBI hits by Aaron Rowand, Pablo Sandoval and Rich Aurilia.

Despite what the numbers say about Detwiler's outing, manger Manny Acta didn't think Detwiler pitched that badly.

"I wasn't as discouraged with him because of the amount of hits or runs or anything," Acta said. "I thought he threw the ball decent. He gave up two blooped doubles that really hurt him. He was very efficient with his pitches. But he left some pitches up. The Giants made the adjustment on him during the second and third time around. Those are the type of things these kids have to learn."

Detwiler disagreed with Acta's assessment of his outing.

"Well, it's 4-1 and we lost, so I didn't think I did my job," Detwiler said. "I kept my changeups up in the zone. When it's up in the zone, it's going to get hit hard. I had some singles and doubles going up the first-base line. I didn't make my pitches when I needed to."

Before his outing, Detwiler watched Johnson's historic game on TV in the clubhouse. It turns out that Detwiler admired Johnson from afar and learned a lot by watching him pitch.

"He is one of my favorite pitchers through my whole life. I watch him any chance I get," Detwiler said. "He either gets contact or first-pitch strikes. That's how he has gone deep into games. That's how he has pitched for 20-plus years."

The Giants were rallying in the top of the sixth inning against Detwiler, when crew chief Jeff Kellogg put a halt to the game. The game was delayed for an hour and seven minutes before it was called.

It rained for most of the game, and Acta felt his team would score runs, but that wasn't the case after the first inning. In fact, the Nationals had a second opportunity to score at least one more run against Cain in the fourth inning. Willie Harris led off with a triple, but was left stranded. Josh Bard flied out to center field, Anderson Hernandez then flied out to left and Detwiler struck out to end the inning.

"We all knew what was coming. I was playing for five innings," Acta said. "We had an opportunity to score a run. A runner on third, no outs, but we couldn't do it. It really hurt because a guy like Cain is not going to give up much. Our situational hitting didn't come through."