Take a Major League Soccer team that won just four of its 34 games last season and posted the league’s worst record in six years.

Add a 45-year-old head coach from Argentina who doesn’t speak much English, but talks of his love for the samurai Bushido code, the way of the warrior.

What do you get?

You get the San Jose Earthquakes, who after a rocky start are one of the hottest soccer teams in North America. In their past two league games, both 3-1 wins on the road, they outshot the opposition by a combined 64-11.

They are 9-2-4 in their past 15 MLS games, 5-1 in their past six, lifting them from oblivion into a tie for fourth place in the Western Conference with a 10-7-4 record. If they keep it up, nobody will want to take them on in the playoffs.

The man who pulled off this neat trick is Matias Almeyda, a long-haired former defensive midfielder who played in two World Cups for Argentina. He carved out an impressive coaching career, starting in his home country and leading two clubs from relegation to success. Before the Quakes got him, he guided Mexico’s Chivas de Guadalajara to five trophies in three years.

He wasted no time getting the Quakes in shape. On a 17-day preseason visit to Cancun, Mexico, they didn’t have time to sunbathe or use the spa. They practiced twice a day and took just one day off, to watch the Super Bowl. They were miserable. Now nobody can outwork them.

Saturday’s game Who: Colorado Rapids (5-11-5) at Earthquakes (10-7-4) When: 6:45 p.m Where: Avaya Stadium TV/Radio:Channel: 48 / 1050, 1370

Read More

“I think every player here is in the best shape of their career,” said midfielder Tommy Thompson Jr.

“Our team has done a complete 180, not just physically but mentally,” said midfielder Shea Salinas, in his 10th year with the Quakes. “We’re not only more fit but more mentally tough.”

Almeyda is a fan of the history of the samurai. “It’s very difficult to implement a code like that in life,” he told ESPN FC. “I try to do it in my life, but I don’t always manage it. It is very difficult; I try.”

Chris Wondolowski, who this year became the league’s all-time leading scorer (he has 153 goals), said Almeyda explains “the principles behind it and the thought process. He gives us talks throughout the week and tries to implement them and to relate them to your lives as well.

“He’s a very honest man in his philosophy, both on and off the field. We’ve learned a lot of life lessons.”

Initially, the language barrier led to some skepticism, Salinas said. Almeyda would talk to the players for a long time without a letup, so the team’s full-time interpreter, a 22-year-old former player named Agustin Zalazar, would have to play catch-up. Eventually the communication problem disappeared.

From the start, Almeyda insisted — as he did in his previous stops — on a family relationship among the players. The Americans and the internationals did everything together.

“He got guys to fight for each other and want to be around each other,” said Thompson, 23, whom Almeyda moved from attacking midfielder to right back with great effect.

There was another new wrinkle: a man defense. In MLS practically everybody plays zone, soccer’s traditional method of operation. A Quakes defender, however, follows his man all over the field, except for the 36-year-old Wondolowski. It wouldn’t make sense to take the big gun out of striking range.

“I’ve played zone my entire life,” Salinas said. “It was a difficult adjustment. It’s a more difficult adjustment to play against us. We just shock teams when they play us. It’s difficult to find space against us.”

According to Wondolowski, Almeyda is an expert at finding opponents’ weaknesses and exploiting them. The pressing defense has led to a big spike in scoring chances, he said.

“As a striker, when you win the ball in the opponent’s defensive third, it makes your job a lot easier. There’s less time and less things to go wrong. You’re right in front of the goal.”

San Jose also brought in four exceptional talents this year, starting with Argentine midfielder Cristian Espinoza, who had never played for Almeyda. He’s on loan from the Spanish team Villarreal and, at this point, could be the best winger in the league.

The other key additions are Brazilian defensive midfielder Judson, 19-year-old Peruvian left back Marcos Lopez and veteran Argentine goalkeeper Daniel Vega. Otherwise, Almeyda took a completely subdued roster and made it roar, including Jackson Yueill, a 22-year-old central midfielder who has become one of the league’s best passers.

Early in the season, Almeyda described his approach to reporters: “I got tired of seeing anti-soccer. For me, the anti-soccer people wait and allow their team to be carried by individual efforts.

“Our scheme involves everyone playing and everyone running. Everyone is committed and whoever is not committed is left to be exposed. We don’t believe in star players; the stars are far away in the sky and cannot be touched. We believe in the same soccer we played in our youth, to enjoy it.”

Tom FitzGerald is a San Francisco Chronicle staff writer. Email: tfitzgerald@sfchronicle.com Twitter: @tomgfitzgerald