Whether the PayPal module redirects a customer to the PayPal payment gateway before or after the order has been created?

The PayPal module redirects a customer to the PayPal payment gateway after the order has been created.
See How is a new order number is generated while placing an order?