Forming an early O-type star through gas accretion?