For most of the past decade, baseball fans averted their eyes from Washington in July. Even the team’s natural fan base sometimes found it difficult to pay attention to a losing team and its half-empty ballpark.

Wilson High assistant baseball coach Shellie Bowers Jr. couldn’t interest his players in free tickets. Jordan Mercer, a high school freshman from Luray, Va., didn’t bother staying up for the team’s late-night West Coast trips. David Sheinfeld, a 25-year-old from Rockville, would watch ESPN for highlights, only to find the announcers focused on the opposing team.

But for the first time since moving to the District, the Nats have three National League all-stars, and could yet add a fourth. They will wake up on July 4 with the best record in the National League; no Washington baseball team has led its league on Independence Day since the 1933 Senators, the last Washington team to play in a World Series.

And the team’s first-half success is translating into huge gains in local and national interest. The talent-rich Nats are drawing the fourth-largest road audience in Major League Baseball, and their home attendance is in the top half of the league, where they haven’t finished since 2005. In-stadium merchandise sales have jumped, and local television ratings have increased by more than 50 percent.

People, it would seem, are finally paying attention.

“I don’t think they can really help it,” all-star shortstop Ian Desmond said Tuesday afternoon. The fans who streamed through the gates an hour before the unusual 6:35 start time agreed.

“When they first got here, I sort of enjoyed the games casually,” said Marian Jenkins, 70, of Waldorf. “Now, I recognize the players, I recognize their numbers, I know little stories about them. I didn’t do that last year. I didn’t do that when they weren’t winning.”

Entering this homestand, the Nats were averaging about 29,500 fans at home games, a year-to-year increase of 28.5 percent, the fourth-largest gain in Major League Baseball.

In-stadium merchandise sales were up an even more impressive 60 percent, with the largest increases in women’s and children’s products, according to the team. The top selling jerseys belonged to 19-year-old phenom outfielder Bryce Harper and the 23-year-old ace of the pitching staff, Stephen Strasburg; “iconic players,” according to chief operating officer Andy Feffer.

Through late June, television ratings for Nationals broadcasts on MASN, MASN2 and WDCW were up 53 percent year-to-year in the Washington market; the average household audience of 52,400 was higher than the most recent local averages for the Capitals or Wizards. The team’s radio broadcasts attracted an average audience of about 70,400 listeners in the May ratings period; up “considerably” over last season, according to a radio industry source.

The team has also made strides in social media; since Jan. 1, the team’s “likes” on Facebook are up 30 percent, and its Twitter followers are up 139 percent.

“It’s filtering throughout the whole city,” said longtime local baseball coach Eddie Saah. “Everybody’s talking about the Nats.”

And the in-stadium crowds, the television audience, the radio listeners and the social media fans have been treated to a team that has allowed the fewest runs in the big leagues, that hasn’t suffered a losing streak of more than four games since May 1, and that has enjoyed at least a share of first place in the National League East for 43 straight days.

“There’s an excitement and an electricity now,” said Jon Darveau, a 33-year-old from Arlington, who’s in his first season as a season-ticket holder. “Every game kind of matters. Instead of coming out of obligation, you’re actually cheering for something.”

The Nats, of course, were in a similar position in the summer of 2005, their first in Washington. They led their division by five-and-a-half games the morning of that Independence Day, with an even better winning percentage than this year’s squad. But they would lose 18 of their next 23 games to fall out of first place, and have rarely been back since.

“Expectations are completely different,” said Charlie Slowes, one of the team’s radio broadcasters since that inaugural season. “I don’t think anybody expected that team to win. I think people think this team has a chance to win and go to the postseason, flat-out, nothing less.”

Those fans are happier, at least according to the feedback the team receives via phone calls, e-mails and social media sites. Feffer, the COO, estimated that positive feedback has outweighed negative comments by 10-1 this season, a significant shift.

“Is it related to winning? Probably,” he admitted. “The hot dogs taste better and the beer is colder, right?”

Of course, the team’s business side doesn’t want to be wholly dependent on pennant races, and Feffer pointed to other baseball franchises that haven’t converted on-field success to off-field passion. Still, as the team nears the season’s midway point with the playoffs in reach, players and fans agreed that first place is a lot better than the alternative.

“You can feel the change in just the past year,” said Drew Storen, the team’s closer last season who is now rehabilitating an injury. “Look around the stadium; people actually have our jerseys on. They came before, but not everybody was wearing our colors.”

“We’re enjoying sitting where we’re sitting, and it wasn’t easy getting here,” added Manager Davey Johnson. “Now the fun’s going to begin. We’ll see how good we are.”

Staff writer Mike Wise contributed to this report.