Yes, they were mating.
According to Desmond Morris (Catwatching, 1986) the male cat bites the back of the female's neck during mating (see above) to immobilize her and to protect himself from a likely attack from his mate. Apparently, a cat's becoming limp in response to being held by the scruff of its neck is an evolved reaction that helps mother cats transport their kittens. Obviously, it also helps them propagate themselves.
Once I tried the neck-hold on one of my cats when I wanted to bring her in from the outside; for several weeks afterwards, I had deep gashes on my arms inflicted by her claws. I should have tried biting her neck instead.