Valero Energy Corp. has completed its $4 billion takeover of Ultramar Diamond Shamrock, creating one of the nation's largest oil-refining companies. 

The merger of the San Antonio-based companies, which will use the Valero name, was closed just before midnight Monday. 

``We've created a stronger organization that will produce much greater earnings for our shareholders and more exciting results for everyone,'' said Bill Greehey, Valero's chief executive, as the deal concluded. 

The new Valero has more than 20,000 employees in the United States and Canada. It is expected to have annual revenues of $32 billion and total assets of about $14 billion. 

The company has a refining capacity of 2 million barrels per day, and a broad distribution network. 

The UDS purchase, which has been in the works since May, also gives Valero nearly 5,000 gas station/convenience stores, as well as a 4,600-mile proprietary pipeline system.