First Union Corp., the nation's sixth-largest bank, will buy Wachovia Corp. in a $13.4 billion stock swap that will create the fourth-largest bank in the country, the companies announced yesterday.