This action is mediated by the second messenger cGMP, which is converted to GMP by the enzyme PDE5.
The E.D. drug Viagra inhibits PDE5, thus prolonging the dilation and erection.