Mechanism refers to the method in which a behavior is performed, or how a behavior works (Tinbergen). All flatworms (Phylum Platyhelminthes) are hermaphrodites in that they have both male and female reproductive organs. All flatworms can either give or receive sperm, i.e. they can be either the male or the female in a pair (Rawlinson et al. 2008). Some flatworms copulate via penis fencing followed by direct insemination. This reproductive method, also known as intradermal hypodermic insemination, is characteristic of large marine flatworms such as pseudocerotids and euryleptids (Newman et al. 2003). The following video provides a good overview of what penis fencing looks like and how it works.
The process begins when two sexually aroused flatworms glide toward one another and make physical contact. Michiels and Vreys performed an experiment to show that hermaphroditic mate choice selection occurs during this physical contact. They hypothesized that flatworms spread out and flatten on top of each other, which Michiels and Vreys suggested could be an effort to assess the partner's overall size (Michiels and Vreys 1997). After this contact, both flatworms then "rear up," raising the front portion of their bodies. The muscles around the reproductive structures tighten and the penis protrudes out from the underside of the flatworm's body toward the other flatworm. The penis is a hard, hypodermic structure. Both flatworms try to stab its penis through the epidermis of the other, no matter where on the body (Newman et al. 2003). This motion of attempted stabbings is known as penis fencing. The duration of penis fencing can last anywhere from 7.7 to 32.8 minutes (Michiels and Newman 1998).
Both flatworms, although sometimes only one, thrust their respective penises through the soft epidermis of the other with short puncturing motions. Each time the penis pierces the epidermis of the other flatworm, a white bundle of sperm is injected (note the white spots by the arrow in the picture). The flatworms could do
this until both flatworms have multiple wounds with "white blisters of foreign sperm" (Newman et al. 2003). In the upper right of the picture, it is easy to tell where the flatworm sustained wounds on both sides leaving behind a permant hole. When the penis fencing stage is complete, the flatworms lower their bodies, retract their penises, and move apart. The injected sperm then joins with an egg in the oviducts of the host flatworm and undergoes embryonic development for a couple of days until it hatches into a young worm (Newman et al. 2003).
In an experiment performed by Michiels and Newman, penis fencing was observed in Pseudoceros bifurcus, a polyclad marine flatworm. They found that in 39 encounters, 287 stabbing attempts led to 46 inseminations in 12 pairs of flatworms. They found that insemination favors the flatworm that injected sperm first, as they will father more eggs and have fewer wounds to heal (Newman et al. 2003). In a different experiment, Michiels and Bakovski further theorized about gender roles. They showed that Bateman's Principle, which is used to explain differences in mating interests of males and females, could also be applied to hermaphrodites. The principle says that matings serve the male interest of the individual, as each mating gives the opportunity to obtain more paternity of eggs in a partner, but does not lead to "more maternity" (Michiels and Bakovski 1999).
Anthes et al. theorized about hermaphroditic mate choice and gender roles similarly to Michiels and Bakovski, except Anthes et al. used a game theory model. They modeled hermaphroditic mating decisions as a game of strategy that represented a version of the Prisoner's Dilemma. Mating partners can either cooperate by assuming both sexual functions or defect by assuming the preferred sex role (male), which costs the female and benefits the male (Anthes et al. 2005).
It could be hypothesised that as hermaphrodites developed the ability to control volume of sperm transfer mutual sperm transfer became more beneficial and that individuals who engage in penis fencing are just remeanents of an older behavior. Of course another possibility is that both mutual sperm transfer and penis fencing seperatly evolved from the same behavior that no longer exisits. A full phylogentic tree would be needed to really explore this. However this is difficult. There are many diffferent species of flatworm alone that would need to be considered. This does not even include the other hermaphrodites (ie. snails, leeches and sea slugs). Many of these species have yet to be discovered. A phylogenetic tree this detailed simply does not exisit yet.