The crude oil depletion, as well as aspects related to environmental pollution and global warming has caused researchers to seek alternative fuels. Biogas is one of the most attractive available fuels. It is of great interest both economically and ecologically. However, it faces problems that may compromise its industrial use. The dual-fuel engines have been investigated as a technique for the recovery of these gases and finding solutions to these problems.In the present work, performance and emissions of a direct injection diesel engine were first evaluated in conventional mode and dual fuel mode. The effect of biogas composition, based on methane content, is then examined. Also, dual fuel operation with regard to knock is investigated. The results show that, up to 95% of engine full load, the brake thermal efficiency (BTE) is lower in dual fuel mode. In terms of the specific consumption, although at high load the gap is much less, it is more significant in case of dual fuel mode. This is justified by the low energy content of biogas in comparison with diesel fuel. In addition, the particulate emissions are drastically reduced compared to conventional diesel operating mode. Thus, the biogas can be used in the dual fuel engines with very attractive performance. Regarding the effect of the biogas composition, the results showed that a biogas with 70% of methane offers the best performance compared to biogas fuels with 50, 60 and 80% of methane content. On the other hand, biogas fuels showed good resistance to knocking since measured torque at the occurrence of knock onset is higher than the maximum torque recorded for conventional diesel. This resistance is even higher when the percentage of carbon dioxide is higher.