There are two kinds of Jonah Hill movies. There’s the lowbrow stuff like “21 Jump Street” and “Get Him To The Greek,” and there’s the Oscar-nominated performances in “The Wolf Of Wall Street” and “Moneyball.” “War Dogs” is being marketed as one of the former, but it is actually one of the latter — a very well-made movie that combines drama and comedy, with very good performances in a based-on-real-life story. And what a story it is.

Hill and Miles Teller play Efraim Diveroli and David Packouz, who in 2005, while in their twenties, discovered a law allowing small businesses to bid on US military contracts online — after the exploitation of no-bid contracts by war profiteers like Lockheed Martin and Raytheon and Dick Cheney’s Halliburton subsidiaries — and wound up selling guns and grenades and missiles and mortars to the Pentagon for the wars in Iraq and Afghanistan. Packouz and Diveroli made millions by bidding on smaller contracts that big defense firms showed little interest in, and then filled those orders by buying outdated weapons equipment online from Asia or Eastern Europe. They thought they could do it all from behind a computer screen in their office in Miami, but on at least a couple of occasions had to go to the Middle East to clean up some messes in person.

“War Dogs” is directed by Todd Phillips (“The Hangover” trilogy) from a script based on Guy Lawson’s 2011 Rolling Stone article. Fortunately, Philips didn’t turn this into a wacky comedy (don’t believe the commercials and trailers!), but got the serio-comic tone just right. And because this is a story about young men who suddenly become ultra-wealthy, there’s so much weed, cocaine and prostitutes that they could have called it “The Wolf Of War Street.”

The supporting cast includes Phillips’ buddy Bradley Cooper in a small part. Ana de Armas plays Packouz’s wife (she looks just like Valeria Galino in “Hot Shots”). Kevin Pollak plays the owner of a chain of dry cleaners who provides some of the money to get the arms dealing operation going. As for Hill and Teller, they’re just right as the leads — certainly better than Jesse Eisenberg and Shia LaBeouf, who were originally set to star and would have been terrible.

I give “War Dogs” an 8 out of 10. It’s the best war-related based-on-real-life movie since “Whiskey Tango Foxtrot.”