This paper proposes a novel swarm intelligence optimizer inspired by human behavior called the Special Forces Algorithm (SFA). SFA is inspired by the missions of modern Special Forces in real life. First of all, in the initial stage of algorithm iteration, the speed of light mechanism is proposed for simulating the UAV-assisted search of special forces, and the loss probability mechanism is proposed for simulating the loss of contact due to force majeure during the search of special forces. The algorithm can more fully explore the solution space and enhance the ability of an algorithm to jump out of a local optimum. Secondly, by simulating the combat tactics of special forces, the algorithm uses command parameters to control the three stages of large-scale search, transitional stage search and small-scale precise search, making the balance between the exploration stage and the exploitation stage more reasonable. Finally, SFA inspired by special forces operations are presented. To verify the effectiveness of the proposed algorithm, SFA is compared with 6 classical algorithms in 23 benchmark functions. In addition, the algorithm is applied to practical engineering problems. Experimental results show that SFA has shown great potential and competitive results. SFA can achieve good search performance and optimization accuracy based on a better balance of exploration and exploitation capabilities.