DETROIT, Aug. 1 — The Toyota Motor Company passed the Ford Motor Company in July for the first time to rank as the second-biggest carmaker in the United States, behind General Motors, auto sales reports out today showed.

All of the major Detroit companies reported double-digit sales declines in July compared with 2005, when auto sales reached record levels because of the popularity of employee discount programs.

Toyota’s milestone was evidence that American buyers are again flocking to Japanese companies in the wake of high gasoline prices. Each of the Detroit companies’ lineups remain dominated by trucks and sport utility vehicles, while the major Japanese companies each sell a greater percentage of cars than light trucks in the United States.

Toyota’s win over Ford came only three months after Toyota passed DaimlerChrysler, including both Chrysler and Mercedes-Benz, to rank as the third-biggest company in terms of American sales.