Right before WW-II, the Germans had invented a machine gun called the MG-42 (in 1939 actually, though it went into full production in 1942, hence the MG-42 name). This gun had an amazingly high rate of fire of over 1200 rounds per minute and it would need barrel replacements often, since the barrels would heat up so much. Hence, they needed a way to produce barrels at a much faster rate as well and the Hammer Forged Rifling method was invented. Interestingly, in the hammer forging method, the barrel is pounded into shape from the outside, whereas in button rifling, the barrel is shaped from the inside. The first hammer forging machine was invented in Erfurt, Germany in 1939 and these machines were shipped off to Austria ahead of the invading Russians at the end of WW-II, where American technicians got their first look at them.
The process starts by first starting with a barrel blank that is about 30% shorter than the final size and has a hole that's 20% larger than the desired size. Then a mandrel made of carbide is selected and inserted into the barrel. This mandrel has the negative image of the barrel (i.e.) it has the grooves carved in relief on the outside of the mandrel:
A mandrel for a .45 caliber rifled barrel. Note the rifling grooves in relief on the surface of the mandrel.
The mandrel is attached to a long thin steel rod and inserted into the barrel. The barrel is then surrounded by carbide hammers which pound it into shape from opposite sides, The barrel is then rotated a bit and then pounded again and the process is repeated until the desired shape is reached. The following two figures should give a very good idea of the process:
Isometric view of the process
As you can see from the figures above, the barrel is hammered into shape a little bit at a time and the barrel is rotated and moved forward by the driver slowly. Since the mandrel and the hammers need to resist a lot of force, they are generally made of carbide. The hammers beat at around 1000 to 1500 times per minute and the whole process is very quick and takes only 3 or 4 minutes to make a barrel rifled.
As the barrel is being hammered, it reduces in diameter and increases in length. Hence the finished barrel ends up around 30% longer than the blank before the hammering process. The hammering process also leaves tiny dents on the outside (looks like snakeskin) which can be either left in place or cleaned up later, depending on the manufacturer.
As is the case with button rifling, this process induces a lot of stress of the barrel. Therefore the barrel needs to be stress-relieved right after the hammer forging process to prevent the barrel from splitting or deforming later. The process of stress relieving is the same as that done with button rifling (i.e.) heat the barrel to 525-575 degrees Celsius and then cool the barrel slowly.
The leading manufacturer of hammer forging machines in the world is GFM GmbH of Steyr, Austria. They not only manufacture hammer forging machines for rifling, but also for forging automobile parts in the European auto industry. Each machine costs over a million dollars and can spit out a new barrel in 3 minutes.
The advantages of this process are many: The process produces an exceptional finish on the end product. The accuracy of the bore and groove dimensions is fairly high and uniformity is maintained in the end product. The hammering process also work hardens the barrel. This process not only cuts the rifling in the barrel, but it can also take care of profiling the barrel and also shaping the chamber, all at the same time. This process is also used as the modern method to manufacture polygonal barrels. The speed of manufacture of barrels is very high, with a barrel produced every 3-4 minutes, which makes it very suitable for mass production
The main disadvantage of this process is the startup costs. There is a reason why this process is only used by large manufacturers, as each hammer forging machine can cost over a million dollars, which puts its out of reach of custom firearms makers, who are generally small shops. The second disadvantage is that this process puts stress on the barrel while manufacturing (even more stress than button rifling) which needs to be stress relieved carefully. Some materials (such as some stainless steel alloys) are harder to manufacture this way since they harden under hammering to such an extent that it becomes harder to further work them.
This process is generally wide spread in Europe because most European arms manufacturers are large state-owned companies and can therefore afford the high initial costs of purchasing a hammer forging machine. It also helps that the biggest manufacturer of hammer forging machines is in Austria, which is centrally located in Europe. SIG Sauer and Heckler & Koch from Germany, Sako from Finland, Glock and Steyr from Austria etc. all use hammer forged rifling. Prior to 1990, this method was not used by US manufacturers, but then Ruger got tired of buying barrels from subcontractors and decided to manufacture their own barrels (especially since there was a shortage of barrels then). Hence they purchased a few hammer forge machines from GFM of Austria and after their success, Remington purchased a few, along with some other manufacturers. This method is still considered a bit of a black art in the US, given that there are around 20-25 hammer forged rifling machines in the whole of the US. In fact, only eight people make all of Ruger's hammer-forged barrels.