Free-electron laser operation in the intermediate gain region