A one-stage device for treating unsettled sewage through a combined UASB reactor-anaerobic digester action in one stage, comprising: - a tank divided in two chambers, wherein ∘ a first chamber is a UASB reactor chamber located in the upper section of the tank, having a sludge bed at the lower part of the chamber, a three-phase separator at the upper part of the chamber, and an external non-pressurized wastewater injection and mixing device having a feeding tank, configured to feed and mix the UASB reactor chamber by pulses, making the influent pass through the sludge bed of the UASB reactor chamber; and ∘ a second chamber is an anaerobic digester chamber located in the lower section of the tank, below the UASB reactor chamber, without heating means for the sewage and configured to receive and hydrolyze the entrapped solids which accumulate in the sludge bed of the upper UASB reactor chamber; wherein both chambers are connected through - at least one baffle sloping partition, configured to separate the upper UASB reactor chamber from the lower anaerobic digester chamber, and to collect biogas generated in the anaerobic digester and the sludge generated in the UASB reactor; and - means for recycling sludge from the anaerobic digester chamber to the UASB reactor chamber, comprising: a gas-lift pump, a gas-sludge separator, and a sludge recycling pipe; wherein said gas-lift pump elevates the sludge from the anaerobic digester chamber to the gas-sludge separator, with the energy provided by the biogas produced in the anaerobic digester chamber, and wherein the sludge recycling pipe sends the sludge from the gas-sludge separator to the pulse feeding tank by gravity; and characterized in that the pulse wastewater injection and mixing device of the UASB reactor chamber is also configured to mix the anaerobic digester chamber, comprising two valves (16, 41) that alternatively let the flow of wastewater and sludge pass from the feeding tank to the UASB reactor chamber or from the feeding tank to the anaerobic digester chamber; also comprising a UASB by-pass pipe and a valve configured to inject the flow of wastewater and sludge from the feeding tank of the external pulse wastewater injection and mixing device directly to the three-phase separator; and control means that act closing or opening the valves (16, 41). - a tank divided in two chambers, wherein ∘ a first chamber is a UASB reactor chamber located in the upper section of the tank, having a sludge bed at the lower part of the chamber, a three-phase separator at the upper part of the chamber, and an external non-pressurized wastewater injection and mixing device having a feeding tank, configured to feed and mix the UASB reactor chamber by pulses, making the influent pass through the sludge bed of the UASB reactor chamber; and ∘ a second chamber is an anaerobic digester chamber located in the lower section of the tank, below the UASB reactor chamber, without heating means for the sewage and configured to receive and hydrolyze the entrapped solids which accumulate in the sludge bed of the upper UASB reactor chamber; wherein both chambers are connected through ∘ a first chamber is a UASB reactor chamber located in the upper section of the tank, having a sludge bed at the lower part of the chamber, a three-phase separator at the upper part of the chamber, and an external non-pressurized wastewater injection and mixing device having a feeding tank, configured to feed and mix the UASB reactor chamber by pulses, making the influent pass through the sludge bed of the UASB reactor chamber; and ∘ a second chamber is an anaerobic digester chamber located in the lower section of the tank, below the UASB reactor chamber, without heating means for the sewage and configured to receive and hydrolyze the entrapped solids which accumulate in the sludge bed of the upper UASB reactor chamber; - at least one baffle sloping partition, configured to separate the upper UASB reactor chamber from the lower anaerobic digester chamber, and to collect biogas generated in the anaerobic digester and the sludge generated in the UASB reactor; and - means for recycling sludge from the anaerobic digester chamber to the UASB reactor chamber, comprising: a gas-lift pump, a gas-sludge separator, and a sludge recycling pipe; wherein said gas-lift pump elevates the sludge from the anaerobic digester chamber to the gas-sludge separator, with the energy provided by the biogas produced in the anaerobic digester chamber, and wherein the sludge recycling pipe sends the sludge from the gas-sludge separator to the pulse feeding tank by gravity; two valves (16, 41) that alternatively let the flow of wastewater and sludge pass from the feeding tank to the UASB reactor chamber or from the feeding tank to the anaerobic digester chamber; also comprising a UASB by-pass pipe and a valve configured to inject the flow of wastewater and sludge from the feeding tank of the external pulse wastewater injection and mixing device directly to the three-phase separator; and control means that act closing or opening the valves (16, 41).