This passage is (hands down and by a wide margin) my absolute favorite Biblical passage so far this year. It has a bit of everything: communal punishment via divinely ordained plagues, double-homicide as atoning sacrifice for whoring about, an angel wielding a sword, dozens of dead animals in high places, a prophet of dubious pedigree hired to pronounce curses which come out as blessings, and the Lord G-d Himself talking out of Balaam's ass.
There is so much good stuff here that (like a mosquito in a nudist colony) I just don't know where to begin. Just for the sake of argument, though, let us begin with Phinehas son of Eleazar, double murderer and biblical hero. Here is the story in a nutshell: Israel goes in for foreign women and their gods (Baalpeor) which greatly angers the L-rd and brings down a plauge. Our hero Phinehas takes it upon himself to rectify the problem by sneaking into the tent of one of his fellow tribesmen, catching him and his shiksa wench in flagrante delicto, and running them both through with a javelin. This double-homicide greatly pleases the L-rd, who relents and stops the plague, which to that point has killed 24,000 people. Two idolatrous fornicators isn't a bad price to pay, I suppose.
Here also we have the fascinating character of Balaam, a prophet of questionable provenance hired by Balak to curse Israel but who instead blesses her not once but three times, and then for an encore he prophesies a great leader for Israel and the conquest or destruction of the people of Moab, Sheth, Edom, Seir, Amalek, Ken, Asshur, and Eber. Did I mention that en route to his misfired attempts at cursing he has an argument with his donkey and an encounter with an angel of God? You've really got to read this part for yourself, because if you don't you'll be missing out on one of the few bits of the OT which really reads like something right out of Æsop.